[libvirt] [PATCH] network: bridge: Avoid freeing uninitialized pointer on cleanup path

Peter Krempa pkrempa at redhat.com
Tue Jun 17 08:05:55 UTC 2014


The cleanup path in networkBuildDhcpDaemonCommandLine could cause a
crash by freeing uninitialized pointer.
---
 src/network/bridge_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 4fc4c9a..8de7a59 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1252,7 +1252,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkObjPtr network,
     int ret = -1;
     char *configfile = NULL;
     char *configstr = NULL;
-    char *leaseshelper_path;
+    char *leaseshelper_path = NULL;

     network->dnsmasqPid = -1;

-- 
1.9.3




More information about the libvir-list mailing list