From nobody Mon Feb 9 05:01:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589809280; cv=none; d=zohomail.com; s=zohoarc; b=VUYmODUnPTvGoKo649auDWA6UadzfwURBXqULMQZOa687ItHCZ2DBTqzAxzDDZFjro+qQr8y0U/3CDT+JRRejguOGh/rpexKIr70WTVm64dX2j9myWBN9vh+IZbAkmgDCBb+/KQs6JgkG8D0WsCWxCofC8YJfG9Kh/PHcUdRT5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589809280; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/9qIyw6ca8bSZoOmTeaMxjGApJ4sxFRCtsuVixnlXY8=; b=YWfzYNvuBeIRBNkC/Gq4l+QavC5uIZrP9PEIL7aB41CjksiA/WbzPChEASKToyJEeme/EAo38P43qRIanr6JlQujL61qyxKXo3crkmG9rRMzmLZn5FbErjS3E/GZgEgWTCRdRD/yxjwY464FeO/wpQHxbeNc0ONhnfNBB3ZQnkA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1589809280608157.06024325562362; Mon, 18 May 2020 06:41:20 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-160-e7N5NpWRNRS-DYSaMW1dNw-1; Mon, 18 May 2020 09:41:15 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 209DF53; Mon, 18 May 2020 13:41:10 +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 F15457958F; Mon, 18 May 2020 13:41:09 +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 A37DD4ED59; Mon, 18 May 2020 13:41:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04IDf6hO014759 for ; Mon, 18 May 2020 09:41:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6CA595D9DC; Mon, 18 May 2020 13:41:06 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id D47D25D9DD for ; Mon, 18 May 2020 13:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589809279; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/9qIyw6ca8bSZoOmTeaMxjGApJ4sxFRCtsuVixnlXY8=; b=hVtD9kQgk3T4Zi1tmJ4Z5+HVVGWe+vn/SKrKkc049lGyjKfGQRB2JLIJ7KiljLg5fn5aaL GQMXcesjo30+2yonY1B2tq698w3g0HRDRQ00zAftmAbIA/saDSheFF/RR3ikVZIOZYjSfL 9L2+Qzd0axp0Mqsiv9JCgNntCEpFZKA= X-MC-Unique: e7N5NpWRNRS-DYSaMW1dNw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] qemu: do not leak the directory in virQEMUDriverConfigLoadMemoryEntry Date: Mon, 18 May 2020 15:40:55 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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: , 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-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) virConfGetValueString returns an allocated string that needs to be freed. Fixes: 34a59fb570dcc1b6b4b4cef1f0eb43fc6f688120 Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 2d5e527b47..2d4e2a46f3 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -969,7 +969,7 @@ static int virQEMUDriverConfigLoadMemoryEntry(virQEMUDriverConfigPtr cfg, virConfPtr conf) { - char *dir =3D NULL; + g_autofree char *dir =3D NULL; int rc; =20 if ((rc =3D virConfGetValueString(conf, "memory_backing_dir", &dir)) <= 0) { --=20 2.25.4