virLockSpaceNewPostExecRestart: virHashNew cannot return NULL

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-07-05 17:02:17 +02:00
parent 0c99ef5b05
commit a16e4dd751

View File

@ -293,8 +293,7 @@ virLockSpace *virLockSpaceNewPostExecRestart(virJSONValue *object)
return NULL; return NULL;
} }
if (!(lockspace->resources = virHashNew(virLockSpaceResourceDataFree))) lockspace->resources = virHashNew(virLockSpaceResourceDataFree);
goto error;
if (virJSONValueObjectHasKey(object, "directory")) { if (virJSONValueObjectHasKey(object, "directory")) {
const char *dir = virJSONValueObjectGetString(object, "directory"); const char *dir = virJSONValueObjectGetString(object, "directory");