[PATCH 08/25] network: fix memory leak in networkBuildDhcpDaemonCommandLine()

Laine Stump laine at redhat.com
Thu Jun 25 03:33:57 UTC 2020

hostsfilestr was not being freed. This will be turned into g_autofree
in an upcoming patch converting a lot more of the same file to using
g_auto*, but I wanted to make a separate patch for this first so the
other patch is simpler to review.

Signed-off-by: Laine Stump <laine at redhat.com>
 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 47d5d95678..aff1b7b1bc 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1628,6 +1628,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkDriverStatePtr driver,
+    VIR_FREE(hostsfilestr);
     return ret;

More information about the libvir-list mailing list