From 2920bd644e8c2d21636a959a0cc717600913ad03 Mon Sep 17 00:00:00 2001 From: Zhang Yi Date: Wed, 2 Jan 2019 13:25:56 +0800 Subject: [PATCH] numa: Fixed the memory leak of numa error message object_get_canonical_path_component() returns a string which must be freed using g_free(). Signed-off-by: Zhang Yi Reviewed-by: Pankaj gupta Reviewed-by: Igor Mammedov Message-Id: <51ba6d7d0333a5517d824a870dd20887156dd15a.1546399191.git.yi.z.zhang@linux.intel.com> Signed-off-by: Eduardo Habkost --- numa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/numa.c b/numa.c index 50ec016013..3875e1efda 100644 --- a/numa.c +++ b/numa.c @@ -533,6 +533,7 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner, error_report("memory backend %s is used multiple times. Each " "-numa option must use a different memdev value.", path); + g_free(path); exit(1); }