From nobody Thu Apr 25 22:21:30 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523893187058156.0898990671269; Mon, 16 Apr 2018 08:39:47 -0700 (PDT) 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 7F1B24E358; Mon, 16 Apr 2018 15:39:37 +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 9120C882E0; Mon, 16 Apr 2018 15:39:36 +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 1481B180215F; Mon, 16 Apr 2018 15:39:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3GFcqSI007522 for ; Mon, 16 Apr 2018 11:38:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 62C13111DCED; Mon, 16 Apr 2018 15:38:52 +0000 (UTC) Received: from localhost.localdomain (ovpn-204-26.brq.redhat.com [10.40.204.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7DEC111DCEC for ; Mon, 16 Apr 2018 15:38:49 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 16 Apr 2018 17:38:46 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu_domain: Don't leak @paths in qemuDomainNamespaceSetupDisk 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.38]); Mon, 16 Apr 2018 15:39:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Introduced in d3db304d2e4. Instead of returning immediately we need to jump onto cleanup label where @paths is freed. Signed-off-by: Michal Privoznik --- Pushed under trivial rule. src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 7000de6a91..6e18886d07 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11199,7 +11199,7 @@ qemuDomainNamespaceSetupDisk(virDomainObjPtr vm, } =20 if (qemuDomainNamespaceMknodPaths(vm, paths, npaths) < 0) - return -1; + goto cleanup; =20 ret =3D 0; cleanup: --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list