From nobody Mon May 6 16:58:02 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 1500089842277802.1504103276536; Fri, 14 Jul 2017 20:37:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF7FC88E60; Sat, 15 Jul 2017 03:37:18 +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 BAB5718EFA; Sat, 15 Jul 2017 03:37:16 +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 456844A491; Sat, 15 Jul 2017 03:37:12 +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 v6F3b908025773 for ; Fri, 14 Jul 2017 23:37:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6D17D63F77; Sat, 15 Jul 2017 03:37:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 65D4663F76 for ; Sat, 15 Jul 2017 03:37:07 +0000 (UTC) Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.217.80.70]) by mx1.redhat.com (Postfix) with ESMTP id 37F8B81222 for ; Sat, 15 Jul 2017 03:37:03 +0000 (UTC) Received: from unknown (HELO mse01.zte.com.cn) (10.30.3.20) by localhost with (AES256-SHA encrypted) SMTP; 15 Jul 2017 03:27:15 -0000 Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id v6F3anSN037079 for ; Sat, 15 Jul 2017 11:36:49 +0800 (GMT-8) (envelope-from lu.zhipeng@zte.com.cn) Received: from ceshi.localdomain ([10.74.120.130]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2017071511365572-4000807 ; Sat, 15 Jul 2017 11:36:55 +0800 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AF7FC88E60 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=zte.com.cn Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AF7FC88E60 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 37F8B81222 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=zte.com.cn Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lu.zhipeng@zte.com.cn DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 37F8B81222 X-scanvirus: By SEG_CYREN AntiVirus Engine X-scanresult: CLEAN X-MAILFROM: X-RCPTTO: X-FROMIP: 10.30.3.20 X-SEG-Scaned: 1 X-Received: unknown,10.30.3.20,20170715112715 From: ZhiPeng Lu To: libvir-list@redhat.com Date: Sat, 15 Jul 2017 11:35:36 +0800 Message-Id: <1500089736-4003-1-git-send-email-lu.zhipeng@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2017-07-15 11:36:56, Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2017-07-15 11:36:30, Serialize complete at 2017-07-15 11:36:30 X-MAIL: mse01.zte.com.cn v6F3anSN037079 X-HQIP: 127.0.0.1 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 200 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 15 Jul 2017 03:37:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 15 Jul 2017 03:37:04 +0000 (UTC) for IP:'63.217.80.70' DOMAIN:'mxhk.zte.com.cn' HELO:'mxhk.zte.com.cn' FROM:'lu.zhipeng@zte.com.cn' RCPT:'' X-RedHat-Spam-Score: -1.502 (BAYES_50, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SPF_PASS) 63.217.80.70 mxhk.zte.com.cn 63.217.80.70 mxhk.zte.com.cn X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: ZhiPeng Lu Subject: [libvirt] [PATCH RESEND] virpcimock: Fix memory leak in pci_driver_new 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 15 Jul 2017 03:37:20 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" @driverpath, allocated by virAsprintfQuiet, was not freed and leaked. Signed-off-by: Zhipeng Lu --- tests/virpcimock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index e9408aa..dec9e01 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -480,6 +480,7 @@ pci_driver_new(const char *name, int fail, ...) =20 if (VIR_APPEND_ELEMENT_QUIET(pciDrivers, nPCIDrivers, driver) < 0) ABORT_OOM(); + VIR_FREE(driverpath); } =20 static struct pciDriver * --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list