Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/util/viriptables.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/util/viriptables.c b/src/util/viriptables.c index 4189578245..198ece3d71 100644 --- a/src/util/viriptables.c +++ b/src/util/viriptables.c @@ -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" */ -- 2.31.1