From nobody Sun May 5 06:50:08 2024 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513087854386565.6887416589901; Tue, 12 Dec 2017 06:10:54 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7553949018; Tue, 12 Dec 2017 14:10:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B5986C20B; Tue, 12 Dec 2017 14:10:52 +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 F3B241800C87; Tue, 12 Dec 2017 14:10:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBCEAk6H024574 for ; Tue, 12 Dec 2017 09:10:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8E191620C3; Tue, 12 Dec 2017 14:10:46 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16D95620D5 for ; Tue, 12 Dec 2017 14:10:44 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 12 Dec 2017 15:10:35 +0100 Message-Id: <1bed3d4f2096888c9952cc3896fdec9efe3f3768.1513087818.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] xenParseXLVnuma: Don't leak @tmp and @token 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 12 Dec 2017 14:10:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" =3D=3D30399=3D=3D 180 (144 direct, 36 indirect) bytes in 3 blocks are defin= itely lost in loss record 91 of 111 =3D=3D30399=3D=3D at 0x4C2E0FF: realloc (vg_replace_malloc.c:785) =3D=3D30399=3D=3D by 0x5574572: virReallocN (viralloc.c:245) =3D=3D30399=3D=3D by 0x5574668: virExpandN (viralloc.c:294) =3D=3D30399=3D=3D by 0x55747AB: virResizeN (viralloc.c:352) =3D=3D30399=3D=3D by 0x560074D: virStringSplitCount (virstring.c:115) =3D=3D30399=3D=3D by 0x137A59: xenParseXLVnuma (xen_xl.c:442) =3D=3D30399=3D=3D by 0x13952B: xenParseXL (xen_xl.c:1064) =3D=3D30399=3D=3D by 0x11884D: testCompareFormatXML (xlconfigtest.c:152) =3D=3D30399=3D=3D by 0x118A87: testCompareHelper (xlconfigtest.c:207) =3D=3D30399=3D=3D by 0x119E36: virTestRun (testutils.c:180) =3D=3D30399=3D=3D by 0x119186: mymain (xlconfigtest.c:274) =3D=3D30399=3D=3D by 0x11BEE3: virTestMain (testutils.c:1119) Signed-off-by: Michal Privoznik Reviewed-by: John Ferlan --- src/xenconfig/xen_xl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 532d6677b..2ef80eb83 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -436,9 +436,11 @@ xenParseXLVnuma(virConfPtr conf, goto cleanup; } =20 + VIR_FREE(tmp); if (VIR_STRDUP(tmp, vtoken) < 0) goto cleanup; =20 + virStringListFree(token); if (!(token =3D virStringSplitCount(tmp, ",", 0, &= ndistances))) goto cleanup; =20 --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:50:08 2024 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 151308785477651.63385147108261; Tue, 12 Dec 2017 06:10:54 -0800 (PST) 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 9D2F46A7D7; Tue, 12 Dec 2017 14:10:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66179620C9; Tue, 12 Dec 2017 14:10:50 +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 2C28D1800BDC; Tue, 12 Dec 2017 14:10:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBCEAm2Z024615 for ; Tue, 12 Dec 2017 09:10:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 31F19620D0; Tue, 12 Dec 2017 14:10:48 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD78B6064F for ; Tue, 12 Dec 2017 14:10:47 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 12 Dec 2017 15:10:37 +0100 Message-Id: <2a61de26423f6a4ae9aec1d80603df1f23102401.1513087818.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] xenMakeIPList: Don't leak @address_array 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 12 Dec 2017 14:10:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" =3D=3D32171=3D=3D 32 bytes in 1 blocks are definitely lost in loss record 4= 4 of 107 =3D=3D32171=3D=3D at 0x4C2DEF6: calloc (vg_replace_malloc.c:711) =3D=3D32171=3D=3D by 0x55744A9: virAllocN (viralloc.c:191) =3D=3D32171=3D=3D by 0x12CED2: xenMakeIPList (xen_common.c:1186) =3D=3D32171=3D=3D by 0x12D0BE: xenFormatNet (xen_common.c:1221) =3D=3D32171=3D=3D by 0x12F0D2: xenFormatVif (xen_common.c:1889) =3D=3D32171=3D=3D by 0x12F2B4: xenFormatConfigCommon (xen_common.c:1944) =3D=3D32171=3D=3D by 0x13BA32: xenFormatXL (xen_xl.c:1971) =3D=3D32171=3D=3D by 0x1186CA: testCompareParseXML (xlconfigtest.c:105) =3D=3D32171=3D=3D by 0x118A64: testCompareHelper (xlconfigtest.c:205) =3D=3D32171=3D=3D by 0x119E36: virTestRun (testutils.c:180) =3D=3D32171=3D=3D by 0x11970E: mymain (xlconfigtest.c:301) =3D=3D32171=3D=3D by 0x11BEE3: virTestMain (testutils.c:1119) Signed-off-by: Michal Privoznik Reviewed-by: John Ferlan --- src/xenconfig/xen_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 40b148321..a815b3e0a 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -1198,6 +1198,7 @@ xenMakeIPList(virNetDevIPInfoPtr guestIP) cleanup: while (i > 0) VIR_FREE(address_array[--i]); + VIR_FREE(address_array); return ret; } =20 --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:50:08 2024 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513087861864608.8988103389756; Tue, 12 Dec 2017 06:11:01 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B3FF2D1EE9; Tue, 12 Dec 2017 14:10:58 +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 394A94F9D8; Tue, 12 Dec 2017 14:10:58 +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 061EC389B; Tue, 12 Dec 2017 14:10:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBCEAobo024630 for ; Tue, 12 Dec 2017 09:10:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id C02C863B81; Tue, 12 Dec 2017 14:10:50 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 480B8620DA for ; Tue, 12 Dec 2017 14:10:48 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 12 Dec 2017 15:10:38 +0100 Message-Id: <48f9f46c3b2cb6e008ce849bfafb72ce644931b8.1513087818.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] fillQemuCaps: Don't leak machine string 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 12 Dec 2017 14:11:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" =3D=3D25251=3D=3D 5 bytes in 1 blocks are definitely lost in loss record 7 = of 81 =3D=3D25251=3D=3D at 0x4C2BEDF: malloc (vg_replace_malloc.c:299) =3D=3D25251=3D=3D by 0x967E379: strdup (in /lib64/libc-2.25.so) =3D=3D25251=3D=3D by 0x5366F9F: virStrdup (virstring.c:941) =3D=3D25251=3D=3D by 0x538BF1D: virDomainCapsNew (domain_capabilities.c:= 121) =3D=3D25251=3D=3D by 0x10EACE: test_virDomainCapsFormat (domaincapstest.= c:295) =3D=3D25251=3D=3D by 0x10FBD2: virTestRun (testutils.c:180) =3D=3D25251=3D=3D by 0x10F192: mymain (domaincapstest.c:457) =3D=3D25251=3D=3D by 0x111C7F: virTestMain (testutils.c:1119) =3D=3D25251=3D=3D by 0x10FA3C: main (domaincapstest.c:528) Signed-off-by: Michal Privoznik Reviewed-by: John Ferlan --- tests/domaincapstest.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 76494a01c..533a4b379 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -159,10 +159,12 @@ fillQemuCaps(virDomainCapsPtr domCaps, !(qemuCaps =3D qemuTestParseCapabilities(caps, path))) goto cleanup; =20 - if (machine && - VIR_STRDUP(domCaps->machine, - virQEMUCapsGetCanonicalMachine(qemuCaps, machine)) < 0) - goto cleanup; + if (machine) { + VIR_FREE(domCaps->machine); + if (VIR_STRDUP(domCaps->machine, + virQEMUCapsGetCanonicalMachine(qemuCaps, machine)) = < 0) + goto cleanup; + } =20 if (!domCaps->machine && VIR_STRDUP(domCaps->machine, --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list