[PATCH 2/6] networkBuildDhcpDaemonCommandLine: Don't leak @configfile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The name of the dnsmasq's config file is initialized and passed to
virCommand. However, the virCommand creates a copy, so we are
responsible for freeing the @configfile ourselves.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/network/bridge_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index fd4dfc9..4298576 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1061,6 +1061,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkObjPtr network,
     *cmdout = cmd;
     ret = 0;
 cleanup:
+    VIR_FREE(configfile);
     VIR_FREE(configstr);
     return ret;
 }
-- 
1.8.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]