From nobody Sun May 5 17:31:59 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 1497246795671372.6860309186817; Sun, 11 Jun 2017 22:53:15 -0700 (PDT) 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 6F05D368E6; Mon, 12 Jun 2017 05:53:13 +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 65691179FD; Mon, 12 Jun 2017 05:53:11 +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 A62FE4BB7F; Mon, 12 Jun 2017 05:53:07 +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 v5C5r5uo002638 for ; Mon, 12 Jun 2017 01:53:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7DBF57F486; Mon, 12 Jun 2017 05:53:05 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77C6E7F48A for ; Mon, 12 Jun 2017 05:53:02 +0000 (UTC) Received: from out1.zte.com.cn (out1.zte.com.cn [202.103.147.172]) by mx1.redhat.com (Postfix) with ESMTP id 45B207E9C9 for ; Mon, 12 Jun 2017 05:52:58 +0000 (UTC) Received: from unknown (HELO mse01.zte.com.cn) (10.30.3.20) by localhost with SMTP; 12 Jun 2017 05:31:12 -0000 Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id v5C5jteW015100 for ; Mon, 12 Jun 2017 13:45:55 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2017061213455665-1248675 ; Mon, 12 Jun 2017 13:45:56 +0800 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6F05D368E6 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=zte.com.cn Authentication-Results: ext-mx06.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 6F05D368E6 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 45B207E9C9 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=zte.com.cn Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=wang.yi59@zte.com.cn DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 45B207E9C9 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,20170612133112 From: Yi Wang To: libvir-list@redhat.com Date: Mon, 12 Jun 2017 02:02:20 -0400 Message-Id: <1497247340-4009-1-git-send-email-wang.yi59@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2017-06-12 13:45:56, Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2017-06-12 13:45:55, Serialize complete at 2017-06-12 13:45:55 X-MAIL: mse01.zte.com.cn v5C5jteW015100 X-HQIP: 127.0.0.1 X-Greylist: Delayed for 00:06:33 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 12 Jun 2017 05:53:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 12 Jun 2017 05:53:00 +0000 (UTC) for IP:'202.103.147.172' DOMAIN:'out1.zte.com.cn' HELO:'out1.zte.com.cn' FROM:'wang.yi59@zte.com.cn' RCPT:'' X-RedHat-Spam-Score: 0.769 (BAYES_50, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_RP_MATCHES_RCVD) 202.103.147.172 out1.zte.com.cn 202.103.147.172 out1.zte.com.cn X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: wang.yi59@zte.com.cn, Liu.Jianjun3@zte.com.cn, Xi Xu Subject: [libvirt] [PATCH] fix memory leak in daemonUnixSocketPaths 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.30]); Mon, 12 Jun 2017 05:53:14 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The @rundir is allocated in virGetUserRuntimeDirectory, may lost when virFileMakePath failed. Signed-off-by: Xi Xu --- daemon/libvirtd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index bac4bc1..d17a694 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -288,6 +288,7 @@ daemonUnixSocketPaths(struct daemonConfig *config, old_umask =3D umask(077); if (virFileMakePath(rundir) < 0) { umask(old_umask); + VIR_FREE(rundir); goto error; } umask(old_umask); --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list