mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
test.c: don't use undefined local, "def"
* src/test.c (testOpenVolumesForPool): Upon early virAsprintf or virXPathNodeSet failure, "goto error" would take us to virStorageVolDefFree(def), but with "def" not defined. Initialize it to NULL.
This commit is contained in:
parent
f435a3002b
commit
20f1f714ba
@ -435,7 +435,7 @@ static int testOpenVolumesForPool(virConnectPtr conn,
|
||||
char *vol_xpath;
|
||||
int i, ret, func_ret = -1;
|
||||
xmlNodePtr *vols = NULL;
|
||||
virStorageVolDefPtr def;
|
||||
virStorageVolDefPtr def = NULL;
|
||||
|
||||
/* Find storage volumes */
|
||||
if (virAsprintf(&vol_xpath, "/node/pool[%d]/volume", poolidx) < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user