From nobody Mon Feb 9 20:09:44 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=1593056176; cv=none; d=zohomail.com; s=zohoarc; b=cRuTpvgyFFmHmjXEw5vpmZFM3+PCPN3uR/buO1QqmKTAOIlyJ3bGFrMlJr9Lxel1542rA2Wp7O+OH5eT2nvhFU1+rFuolYF2YVnJpB4zgctmLsQ1bkcmDyF80Nasubw4MpZaB45pON/NE+BkIMOvP+Dyenv6KulDfQ3GRNCB1YM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593056176; 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=oHcXA7VkRcLXerVOQST7/83yOG5vKVuD17e14Iqvzkg=; b=TSKT6UaWp7AIrJNQSJVCDoaI7bgGvjRepPQ+5SDoU3qgK02ykM2bN0ZhT+C+vucv+qxBvqMB3saMIjax8ITRxRzw2c2dIoAY4wsY+1AmpMIdC6mFKhXSsE1XZpb5A7LyKtmVR/3OHbFEOezAwJJ66V1Czys9v07tBuvnl2myRLE= 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 1593056176671294.2629943074039; Wed, 24 Jun 2020 20:36:16 -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-175-IHdf-tXDNbKmORKn5PiHaQ-1; Wed, 24 Jun 2020 23:34:46 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC4C618A076D; Thu, 25 Jun 2020 03:34:35 +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 AE4635D9D3; Thu, 25 Jun 2020 03:34:35 +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 7DBE7180CB27; Thu, 25 Jun 2020 03:34:35 +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 05P3YP2h007821 for ; Wed, 24 Jun 2020 23:34:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7457C5BAC0; Thu, 25 Jun 2020 03:34:25 +0000 (UTC) Received: from vhost2.laine.org (ovpn-114-28.phx2.redhat.com [10.3.114.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 314495BACC for ; Thu, 25 Jun 2020 03:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593056175; 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=oHcXA7VkRcLXerVOQST7/83yOG5vKVuD17e14Iqvzkg=; b=gJMw8OQmDaM2D1FWTPwGeOgZVleso5p1cJRcaDKdZCmZNaxgqwd3oR4SncHOa8wL5BSOB5 b9eOVGXNNWifjwhRyp6idVKM0uATPLaBJn670gzNil3WP0zybdcW1pKBxVzSTOLERfPIhd 5wu8QbxfJ8uGphI4wV0pFBZMoOfy0q0= X-MC-Unique: IHdf-tXDNbKmORKn5PiHaQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [PATCH 08/25] network: fix memory leak in networkBuildDhcpDaemonCommandLine() Date: Wed, 24 Jun 2020 23:33:57 -0400 Message-Id: <20200625033414.1819594-9-laine@redhat.com> In-Reply-To: <20200625033414.1819594-1-laine@redhat.com> References: <20200625033414.1819594-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" hostsfilestr was not being freed. This will be turned into g_autofree in an upcoming patch converting a lot more of the same file to using g_auto*, but I wanted to make a separate patch for this first so the other patch is simpler to review. Signed-off-by: Laine Stump Reviewed-by: J=C3=A1n Tomko --- src/network/bridge_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 47d5d95678..aff1b7b1bc 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1628,6 +1628,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkDriverSta= tePtr driver, virObjectUnref(dnsmasq_caps); VIR_FREE(configfile); VIR_FREE(configstr); + VIR_FREE(hostsfilestr); VIR_FREE(leaseshelper_path); return ret; } --=20 2.25.4