aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-01-22 11:08:05 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-30 11:14:46 +0100
commit13b10e05e4b89418a78500da05b25164f786d7e4 (patch)
tree360032b7a2f8468ab843d0f3d73183f23f3c2d87 /qapi
parentbe168af860109a1ecc8526c5bbe0ace1536448b8 (diff)
qapi: Fix unchecked strdup() by converting to g_strdup()
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>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/qmp-registry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qapi/qmp-registry.c b/qapi/qmp-registry.c
index 70cdbca470..28bbbe849e 100644
--- 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++;
}