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

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

 



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

--
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]