aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++;
}