1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-21 22:03:49 +03:00

qemusecuritymock: init_hash: 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 15:42:46 +02:00
parent 69e2426b83
commit 3ae0c7715e

View File

@ -100,20 +100,9 @@ init_hash(void)
if (xattr_paths)
return;
if (!(xattr_paths = virHashNew(g_free))) {
fprintf(stderr, "Unable to create hash table for XATTR paths\n");
abort();
}
if (!(chown_paths = virHashNew(g_free))) {
fprintf(stderr, "Unable to create hash table for chowned paths\n");
abort();
}
if (!(selinux_paths = virHashNew(g_free))) {
fprintf(stderr, "Unable to create hash table for selinux labels\n");
abort();
}
xattr_paths = virHashNew(g_free);
chown_paths = virHashNew(g_free);
selinux_paths = virHashNew(g_free);
}