From patchwork Mon Jan 28 19:43:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1032210 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43pKpF4g1Zz9sDK for ; Tue, 29 Jan 2019 06:44:37 +1100 (AEDT) Received: from localhost ([127.0.0.1]:37757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goCpf-000484-I9 for incoming@patchwork.ozlabs.org; Mon, 28 Jan 2019 14:44:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goCp2-00044e-N9 for qemu-devel@nongnu.org; Mon, 28 Jan 2019 14:43:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goCp2-0004RR-4g for qemu-devel@nongnu.org; Mon, 28 Jan 2019 14:43:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43314) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goCp1-0004Qi-Up for qemu-devel@nongnu.org; Mon, 28 Jan 2019 14:43:56 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 277C4C0D2634; Mon, 28 Jan 2019 19:43:55 +0000 (UTC) Received: from localhost (ovpn-116-63.gru2.redhat.com [10.97.116.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F4FF87A0; Mon, 28 Jan 2019 19:43:54 +0000 (UTC) From: Eduardo Habkost To: Peter Maydell , qemu-devel@nongnu.org Date: Mon, 28 Jan 2019 17:43:50 -0200 Message-Id: <20190128194351.14679-2-ehabkost@redhat.com> In-Reply-To: <20190128194351.14679-1-ehabkost@redhat.com> References: <20190128194351.14679-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 28 Jan 2019 19:43:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] numa: Fixed the memory leak of numa error message X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Zhang Yi , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: 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 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); }