Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/util/viriptables.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/viriptables.c b/src/util/viriptables.c index 198ece3d71..847af9b9d7 100644 --- a/src/util/viriptables.c +++ b/src/util/viriptables.c @@ -70,8 +70,8 @@ iptablesPrivateChainCreate(virFirewall *fw, void *opaque) { iptablesGlobalChainData *data = opaque; - GHashTable *chains = virHashNew(NULL); - GHashTable *links = virHashNew(NULL); + g_autoptr(GHashTable) chains = virHashNew(NULL); + g_autoptr(GHashTable) links = virHashNew(NULL); const char *const *tmp; int ret = -1; size_t i; @@ -114,8 +114,6 @@ iptablesPrivateChainCreate(virFirewall *fw, ret = 0; cleanup: - virHashFree(chains); - virHashFree(links); return ret; } -- 2.31.1