mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
69e2426b83
commit
3ae0c7715e
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue