edecca
From 5d5b2a9e3641fe1f54913284154ffb15c5a89bbb Mon Sep 17 00:00:00 2001
edecca
Message-Id: <5d5b2a9e3641fe1f54913284154ffb15c5a89bbb@dist-git>
edecca
From: Laine Stump <laine@laine.org>
edecca
Date: Wed, 13 Feb 2019 18:18:59 -0500
edecca
Subject: [PATCH] util: fix memory leak in virFirewallDInterfaceSetZone()
edecca
edecca
commit 3bba4825 added the new function virFirewallDInterfaceSetZone()
edecca
which calledsends virDBUSCallMethod a DBusMessage** for the reply
edecca
message, but doesn't use the reply, and also doesn't free it. Since
edecca
this arg is allowed to be NULL, this patch simply sets it to NULL so
edecca
we don't have to deal with it.
edecca
edecca
This patch is a part of the resolution to
edecca
https://bugzilla.redhat.com/1650320
edecca
edecca
Signed-off-by: Laine Stump <laine@laine.org>
edecca
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
edecca
(cherry picked from commit 2c48e84b7566eab1676400d73a7934f93a7ec831)
edecca
Message-Id: <20190213231859.27018-1-laine@redhat.com>
edecca
---
edecca
 src/util/virfirewalld.c | 3 +--
edecca
 1 file changed, 1 insertion(+), 2 deletions(-)
edecca
edecca
diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c
edecca
index 8aeb31db80..b49c895138 100644
edecca
--- a/src/util/virfirewalld.c
edecca
+++ b/src/util/virfirewalld.c
edecca
@@ -354,13 +354,12 @@ virFirewallDInterfaceSetZone(const char *iface,
edecca
                              const char *zone)
edecca
 {
edecca
     DBusConnection *sysbus = virDBusGetSystemBus();
edecca
-    DBusMessage *reply = NULL;
edecca
 
edecca
     if (!sysbus)
edecca
         return -1;
edecca
 
edecca
     return virDBusCallMethod(sysbus,
edecca
-                             &reply,
edecca
+                             NULL,
edecca
                              NULL,
edecca
                              VIR_FIREWALL_FIREWALLD_SERVICE,
edecca
                              "/org/fedoraproject/FirewallD1",
edecca
-- 
edecca
2.20.1
edecca