aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hmp.c2
-rw-r--r--numa.c9
2 files changed, 4 insertions, 7 deletions
diff --git a/hmp.c b/hmp.c
index ba40c75005..40a90dae70 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1715,4 +1715,6 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)
}
monitor_printf(mon, "\n");
+
+ qapi_free_MemdevList(memdev_list);
}
diff --git a/numa.c b/numa.c
index aa772aafad..f07149b12d 100644
--- a/numa.c
+++ b/numa.c
@@ -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;
}