diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 49fe24b28c..19903b6c51 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -748,7 +748,7 @@ virStoragePoolObjAssignDef(virStoragePoolObjListPtr pools, } if (!(obj = virStoragePoolObjNew())) - return NULL; + goto error; virUUIDFormat(def->uuid, uuidstr); if (virHashAddEntry(pools->objs, uuidstr, obj) < 0)