diff options
Diffstat (limited to 'qapi/qmp-registry.c')
-rw-r--r-- | qapi/qmp-registry.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qapi/qmp-registry.c b/qapi/qmp-registry.c index 541461337..28bbbe849 100644 --- a/qapi/qmp-registry.c +++ b/qapi/qmp-registry.c @@ -12,7 +12,9 @@ * */ -#include "qapi/qmp-core.h" +#include <glib.h> +#include <string.h> +#include "qapi/qmp/dispatch.h" static QTAILQ_HEAD(QmpCommandList, QmpCommand) qmp_commands = QTAILQ_HEAD_INITIALIZER(qmp_commands); @@ -90,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++; } |