From: Jim Meyering Date: Thu, 3 Sep 2009 10:33:11 +0000 (+0200) Subject: openvz_conf.c: don't use undefined local, "net" X-Git-Tag: v0.7.1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e813ceb3eeb4027894bfe98a8442ba2ed328281;p=thirdparty%2Flibvirt.git openvz_conf.c: don't use undefined local, "net" * src/openvz_conf.c (openvzReadNetworkConf): Initialize "net". Otherwise, upon openvzRead... failure, we would "goto error;" where an uninitialized "net" could be dereferenced. --- diff --git a/src/openvz_conf.c b/src/openvz_conf.c index a172fe3fad..41c668473c 100644 --- a/src/openvz_conf.c +++ b/src/openvz_conf.c @@ -183,7 +183,7 @@ openvzReadNetworkConf(virConnectPtr conn, virDomainDefPtr def, int veid) { int ret; - virDomainNetDefPtr net; + virDomainNetDefPtr net = NULL; char temp[4096]; char *token, *saveptr = NULL;