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.
This commit is contained in:
Jim Meyering 2009-09-03 12:33:11 +02:00
parent 20f1f714ba
commit 1e813ceb3e

View File

@ -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;