From nobody Sat Jul 5 17:06:49 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=126.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521282355651991.9222490081571; Sat, 17 Mar 2018 03:25:55 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7321A7FEC2; Sat, 17 Mar 2018 10:25:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46E555D70A; Sat, 17 Mar 2018 10:25:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 04D364CA9A; Sat, 17 Mar 2018 10:25:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2HAP9fh009685 for ; Sat, 17 Mar 2018 06:25:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 85FE45D75C; Sat, 17 Mar 2018 10:25:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D6AB5D755; Sat, 17 Mar 2018 10:25:04 +0000 (UTC) Received: from m15-114.126.com (m15-114.126.com [220.181.15.114]) by mx1.redhat.com (Postfix) with ESMTP id E06034E05D; Sat, 17 Mar 2018 10:25:00 +0000 (UTC) Received: from localhost.localdomain (unknown [58.213.111.46]) by smtp7 (Coremail) with SMTP id DsmowAAXv8Xy7KxaEhREDg--.27012S4; Sat, 17 Mar 2018 18:24:57 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=agbSiy+oIOiu+631wW SPp4DqCqxM3QQ2QCUiDK3Dv7A=; b=BQ3u8C4Mlnd9nxCC4+Vu9eoua68ctTBgRK pa8T42N3khzm3mo27m4JyQbpSk55QW8l0pAkJfGRgEjYYSoxjtwObLm3dIH09Sy+ GU1NRtqKI7xkE+u5AHBjpILphSjcdzd/Va1NE0ehLhT86LdYEdrQL7+ZL4C6EbFe 63Gdh8NIM= From: Chen Hanxiao To: libvir-list@redhat.com Date: Sat, 17 Mar 2018 18:24:09 +0800 Message-Id: <20180317102409.20265-3-chen_han_xiao@126.com> In-Reply-To: <20180317102409.20265-1-chen_han_xiao@126.com> References: <20180317102409.20265-1-chen_han_xiao@126.com> X-CM-TRANSID: DsmowAAXv8Xy7KxaEhREDg--.27012S4 X-Coremail-Antispam: 1Uf129KBjvdXoWrurWDur4UArW3tw4kZFW3GFg_yoW3Xwc_Cr yUCws7GrZ5Cryjka4Y9FnxArnYvwn5Xwn5Cwsayrs8K34j9FyrtF9FqFs3Kr1DJayfZFyx Xw1rtFnY934vqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0DfH5UUUUU== X-Originating-IP: [58.213.111.46] X-CM-SenderInfo: xfkh0spkdqs5xldrqiyswou0bp/1tbiaRoMrlpD4avysQAAsB X-Greylist: Sender passed SPF test, ACL 227 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 17 Mar 2018 10:25:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 17 Mar 2018 10:25:03 +0000 (UTC) for IP:'220.181.15.114' DOMAIN:'m15-114.126.com' HELO:'m15-114.126.com' FROM:'chen_han_xiao@126.com' RCPT:'' X-RedHat-Spam-Score: 1.99 * (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_PSBL, SPF_PASS, T_RP_MATCHES_RCVD) 220.181.15.114 m15-114.126.com 220.181.15.114 m15-114.126.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Chen Hanxiao Subject: [libvirt] [PATCH 2/2] qemu: fix a mem leak X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 17 Mar 2018 10:25:54 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Chen Hanxiao fix a mem leak Signed-off-by: Chen Hanxiao --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5c55c69af..14b72a8f6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20682,6 +20682,8 @@ qemuARPGetInterfaces(virDomainObjPtr vm, =20 if (VIR_APPEND_ELEMENT(ifaces_ret, ifaces_count, iface) < = 0) goto cleanup; + + virDomainInterfaceFree(iface); } } } @@ -20691,6 +20693,7 @@ qemuARPGetInterfaces(virDomainObjPtr vm, =20 cleanup: virArpTableFree(table); + virDomainInterfaceFree(iface); =20 if (ifaces_ret) { for (i =3D 0; i < ifaces_count; i++) --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list