]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
network: fix memory leak in leaseshelper.c
authorPhilipp Schuster <philipp.schuster@cyberus-technology.de>
Wed, 7 Jan 2026 14:13:24 +0000 (15:13 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 8 Jan 2026 08:46:18 +0000 (09:46 +0100)
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 <philipp.schuster@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/network/leaseshelper.c

index e1c0e8182864e4a70b48ee96f0c39dff26269bd4..8206712e122b98f33f6b4ac085a1bfd944498002 100644 (file)
@@ -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");