OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be168af
)
qapi: Fix unchecked strdup() by converting to g_strdup()
author
Markus Armbruster
<armbru@redhat.com>
Tue, 22 Jan 2013 10:08:05 +0000
(11:08 +0100)
committer
Stefan Hajnoczi
<stefanha@redhat.com>
Wed, 30 Jan 2013 10:14:46 +0000
(11:14 +0100)
Note that we already free with g_free().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qapi/qmp-registry.c
patch
|
blob
|
history
diff --git
a/qapi/qmp-registry.c
b/qapi/qmp-registry.c
index
70cdbca
..
28bbbe8
100644
(file)
--- a/
qapi/qmp-registry.c
+++ b/
qapi/qmp-registry.c
@@
-92,7
+92,7
@@
char **qmp_get_command_list(void)
list_head = list = g_malloc0(count * sizeof(char *));
QTAILQ_FOREACH(cmd, &qmp_commands, node) {
- *list = strdup(cmd->name);
+ *list =
g_
strdup(cmd->name);
list++;
}