1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

iptablesPrivateChainCreate: 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:44:20 +02:00
parent 1ae0067c77
commit 7bf435fbb0

View File

@ -70,17 +70,12 @@ iptablesPrivateChainCreate(virFirewall *fw,
void *opaque)
{
iptablesGlobalChainData *data = opaque;
GHashTable *chains = NULL;
GHashTable *links = NULL;
GHashTable *chains = virHashNew(NULL);
GHashTable *links = virHashNew(NULL);
const char *const *tmp;
int ret = -1;
size_t i;
if (!(chains = virHashNew(NULL)))
goto cleanup;
if (!(links = virHashNew(NULL)))
goto cleanup;
tmp = lines;
while (tmp && *tmp) {
if (STRPREFIX(*tmp, "-N ")) { /* eg "-N LIBVIRT_INP" */