From: Philipp Schuster Date: Wed, 7 Jan 2026 14:13:24 +0000 (+0100) Subject: network: fix memory leak in leaseshelper.c X-Git-Tag: v12.0.0-rc1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32749427de839c7dd56b6c5e803618ce0e33e4e5;p=thirdparty%2Flibvirt.git network: fix memory leak in leaseshelper.c This was triggered in my experiments with the `virsh net-*` command family. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster Reviewed-by: Michal Privoznik --- diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index e1c0e81828..8206712e12 100644 --- a/src/network/leaseshelper.c +++ b/src/network/leaseshelper.c @@ -83,7 +83,7 @@ main(int argc, char **argv) g_autofree char *custom_lease_file = NULL; const char *ip = NULL; const char *mac = NULL; - const char *leases_str = NULL; + g_autofree char *leases_str = NULL; const char *iaid = getenv("DNSMASQ_IAID"); const char *clientid = getenv("DNSMASQ_CLIENT_ID"); const char *interface = getenv("DNSMASQ_INTERFACE");