virDomainDefBootOrderPostParse: 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 16:54:01 +02:00
parent f6252cf6b0
commit c94a217e5c

View File

@ -5935,10 +5935,7 @@ virDomainDefCollectBootOrder(virDomainDef *def G_GNUC_UNUSED,
static int
virDomainDefBootOrderPostParse(virDomainDef *def)
{
g_autoptr(GHashTable) bootHash = NULL;
if (!(bootHash = virHashNew(NULL)))
return -1;
g_autoptr(GHashTable) bootHash = virHashNew(NULL);
if (virDomainDeviceInfoIterate(def, virDomainDefCollectBootOrder, bootHash) < 0)
return -1;