diff options
-rw-r--r-- | hmp.c | 2 | ||||
-rw-r--r-- | numa.c | 9 |
2 files changed, 4 insertions, 7 deletions
@@ -1715,4 +1715,6 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict) } monitor_printf(mon, "\n"); + + qapi_free_MemdevList(memdev_list); } @@ -379,7 +379,7 @@ error: MemdevList *qmp_query_memdev(Error **errp) { Object *obj; - MemdevList *list = NULL, *m; + MemdevList *list = NULL; obj = object_resolve_path("/objects", NULL); if (obj == NULL) { @@ -393,11 +393,6 @@ MemdevList *qmp_query_memdev(Error **errp) return list; error: - while (list) { - m = list; - list = list->next; - g_free(m->value); - g_free(m); - } + qapi_free_MemdevList(list); return NULL; } |