openvz_conf.c: don't dereference NULL upon failure

* src/openvz/openvz_conf.c (openvzLoadDomains): Avoid NULL deref
of "dom".
This commit is contained in:
Jim Meyering 2009-12-15 16:16:57 +01:00
parent 20fa7cdb32
commit c1237818d2

View File

@ -535,7 +535,8 @@ int openvzLoadDomains(struct openvz_driver *driver) {
cleanup:
fclose(fp);
virDomainObjUnref(dom);
if (dom)
virDomainObjUnref(dom);
return -1;
}