From nobody Sat Apr 27 22:40:21 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.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; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1492080330416200.21128154809253; Thu, 13 Apr 2017 03:45:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 890956AAD5; Thu, 13 Apr 2017 10:45:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23DA79FDCD; Thu, 13 Apr 2017 10:45:27 +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 8F9354E9BD; Thu, 13 Apr 2017 10:45:23 +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 v3DAjMcg021251 for ; Thu, 13 Apr 2017 06:45:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 14E347A419; Thu, 13 Apr 2017 10:45:22 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E9A417105 for ; Thu, 13 Apr 2017 10:45:20 +0000 (UTC) Received: from dggrg01-dlp.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 16ECA3D944 for ; Thu, 13 Apr 2017 10:45:16 +0000 (UTC) Received: from 172.30.72.53 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.53]) by dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id AMN22155; Thu, 13 Apr 2017 18:45:13 +0800 (CST) Received: from localhost (10.177.17.7) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Thu, 13 Apr 2017 18:45:02 +0800 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 890956AAD5 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: ext-mx02.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 890956AAD5 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 16ECA3D944 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=king.wang@huawei.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 16ECA3D944 From: Wang King To: Date: Thu, 13 Apr 2017 18:44:46 +0800 Message-ID: <20170413104446.11096-1-king.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.17.7] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.58EF56B9.011D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6f990978837197cc8e3fb69dc7aaffab X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 13 Apr 2017 10:45:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 13 Apr 2017 10:45:19 +0000 (UTC) for IP:'45.249.212.187' DOMAIN:'szxga01-in.huawei.com' HELO:'dggrg01-dlp.huawei.com' FROM:'king.wang@huawei.com' RCPT:'' X-RedHat-Spam-Score: 0.398 (BAYES_50, DCC_REPUT_00_12, RP_MATCHES_RCVD, SPF_PASS) 45.249.212.187 szxga01-in.huawei.com 45.249.212.187 szxga01-in.huawei.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: yanqiangjun@huawei.com, weidong.huang@huawei.com, Wang King , weifuqiang@huawei.com Subject: [libvirt] [PATCH] daemon: Fix domain name leak in error path 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: , 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 13 Apr 2017 10:45:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" domain name duplicated in make_nonnull_domain, but not freed when virTypedP= aramsSerialize return negative. --- daemon/remote.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/remote.c b/daemon/remote.c index 1610fea..edee981 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1066,8 +1066,10 @@ remoteRelayDomainEventTunable(virConnectPtr conn, if (virTypedParamsSerialize(params, nparams, (virTypedParameterRemotePtr *) &data.param= s.params_val, &data.params.params_len, - VIR_TYPED_PARAM_STRING_OKAY) < 0) + VIR_TYPED_PARAM_STRING_OKAY) < 0) { + VIR_FREE(data.dom.name); return -1; + } =20 remoteDispatchObjectEventSend(callback->client, remoteProgram, REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABL= E, --=20 2.8.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list