From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZAYo-0001YT-2A for qemu-devel@nongnu.org; Tue, 18 Dec 2018 03:17:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZAYn-0001Qn-6i for qemu-devel@nongnu.org; Tue, 18 Dec 2018 03:17:02 -0500 Received: from mga12.intel.com ([192.55.52.136]:47279) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZAYm-0001QF-Ta for qemu-devel@nongnu.org; Tue, 18 Dec 2018 03:17:01 -0500 From: Zhang Yi Date: Tue, 18 Dec 2018 16:16:55 +0800 Message-Id: <51ba6d7d0333a5517d824a870dd20887156dd15a.1545120100.git.yi.z.zhang@linux.intel.com> In-Reply-To: References: Subject: [Qemu-devel] [PATCH V7 1/6] numa: Fixed the memory leak of numa error message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mst@redhat.com, peter.maydell@linaro.org, yu.c.zhang@linux.intel.com, ehabkost@redhat.com, imammedo@redhat.com Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, stefanha@redhat.com, crosthwaite.peter@gmail.com, richard.henderson@linaro.org, xiaoguangrong.eric@gmail.com, Zhang Yi 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 --- numa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/numa.c b/numa.c index 50ec016..3875e1e 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); } -- 2.7.4