]> xenbits.xensource.com Git - libvirt.git/commitdiff
network: bridge: Avoid freeing uninitialized pointer on cleanup path
authorPeter Krempa <pkrempa@redhat.com>
Tue, 17 Jun 2014 08:03:53 +0000 (10:03 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Jun 2014 08:03:53 +0000 (10:03 +0200)
The cleanup path in networkBuildDhcpDaemonCommandLine could cause a
crash by freeing uninitialized pointer.

src/network/bridge_driver.c

index 4fc4c9a66b48217728ca3db9215b6ca29eb8589e..8de7a5920a5cbf664dbc1c81b67388e5832e8309 100644 (file)
@@ -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;