From nobody Thu May 2 06:45:12 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=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556441632; cv=none; d=zoho.com; s=zohoarc; b=SRAwAk6ILO6QZeQvxhD0aVYgE+yRUgIjl6nV6s1u03K3DaEgR5i4hoAx6ppTjwWJVRbq2l9hm+Mqcs602iAkS8hhF2AK6/37bWmwS4z502S9FYG+RLiQ3TnXV9q+wgpi5HTdthP0S2hd1FYd9mt8Qht2BVYYxEYy4Vvu/jmH290= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556441632; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=aDeHf+j4eL5k8H4riDPGCjVp8YRg3GH2tRqOgVL3GnQ=; b=nXYXcG5XpVrOpEofajN6jQsz9YeoPRTtrRYzWANPSh64deaYASm8hevctdBYF1+T7CKLwyfQsM9dSFp6S4o1lJ+jBmXO8UjCLxw1y1/Ofp0ND993PsvQdFDsbcvvsGcizAQ0zYgPHo/TJ8niQj0hbRCmDp/43qS570Cz2eqJWPA= ARC-Authentication-Results: i=1; mx.zoho.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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1556441632326523.1868582512853; Sun, 28 Apr 2019 01:53:52 -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 AB4F75AFE3; Sun, 28 Apr 2019 08:53:49 +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 0B1416BF9A; Sun, 28 Apr 2019 08:53:48 +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 B05D3181AC92; Sun, 28 Apr 2019 08:53:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3S8rh0R012160 for ; Sun, 28 Apr 2019 04:53:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F2711001DCE; Sun, 28 Apr 2019 08:53:43 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A8421001E69 for ; Sun, 28 Apr 2019 08:53:41 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A59D3882EF for ; Sun, 28 Apr 2019 08:53:40 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Apr 2019 01:53:40 -0700 Received: from david-unc.bj.intel.com ([10.238.145.63]) by orsmga001.jf.intel.com with ESMTP; 28 Apr 2019 01:53:39 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,405,1549958400"; d="scan'208";a="227402900" From: Wang Huaqiang To: libvir-list@redhat.com Date: Sun, 28 Apr 2019 16:52:41 +0800 Message-Id: <1556441561-6136-1-git-send-email-huaqiang.wang@intel.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sun, 28 Apr 2019 08:53:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sun, 28 Apr 2019 08:53:40 +0000 (UTC) for IP:'192.55.52.43' DOMAIN:'mga05.intel.com' HELO:'mga05.intel.com' FROM:'huaqiang.wang@intel.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 192.55.52.43 mga05.intel.com 192.55.52.43 mga05.intel.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Wang Huaqiang Subject: [libvirt] [PATCH] CONF: bug, release 'alloc' object in cleanup 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.39]); Sun, 28 Apr 2019 08:53:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In case error happens before 'alloc' is transferred to 'resctrl', the 'alloc' object should be released. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6331424..7d20276 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -19396,6 +19396,7 @@ virDomainCachetuneDefParse(virDomainDefPtr def, =20 ret =3D 0; cleanup: + virObjectUnref(alloc); virDomainResctrlDefFree(resctrl); return ret; } @@ -19597,6 +19598,7 @@ virDomainMemorytuneDefParse(virDomainDefPtr def, =20 ret =3D 0; cleanup: + virObjectUnref(alloc); virDomainResctrlDefFree(resctrl); return ret; } --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list