]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: fix memory leak in virFirewallDInterfaceSetZone()
authorLaine Stump <laine@laine.org>
Wed, 13 Feb 2019 15:57:57 +0000 (10:57 -0500)
committerLaine Stump <laine@laine.org>
Wed, 13 Feb 2019 19:30:14 +0000 (14:30 -0500)
commit 3bba4825 added the new function virFirewallDInterfaceSetZone()
which calledsends virDBUSCallMethod a DBusMessage** for the reply
message, but doesn't use the reply, and also doesn't free it. Since
this arg is allowed to be NULL, this patch simply sets it to NULL so
we don't have to deal with it.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/util/virfirewalld.c

index 47bacdcf4aec29229e70de0af6dbd1a17f2ea89d..f8965eea09a5a1dcd2dd2e7a080d8a3724520e7c 100644 (file)
@@ -351,13 +351,12 @@ virFirewallDInterfaceSetZone(const char *iface,
                              const char *zone)
 {
     DBusConnection *sysbus = virDBusGetSystemBus();
-    DBusMessage *reply = NULL;
 
     if (!sysbus)
         return -1;
 
     return virDBusCallMethod(sysbus,
-                             &reply,
+                             NULL,
                              NULL,
                              VIR_FIREWALL_FIREWALLD_SERVICE,
                              "/org/fedoraproject/FirewallD1",