Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/virstorageobj.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 32ed55ff8b..18a7718de9 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -398,11 +398,8 @@ virStoragePoolObjListNew(void) if (!(pools = virObjectRWLockableNew(virStoragePoolObjListClass))) return NULL; - if (!(pools->objs = virHashNew(virObjectFreeHashData)) || - !(pools->objsName = virHashNew(virObjectFreeHashData))) { - virObjectUnref(pools); - return NULL; - } + pools->objs = virHashNew(virObjectFreeHashData); + pools->objsName = virHashNew(virObjectFreeHashData); return pools; } -- 2.31.1