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