1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

iptablesPrivateChainCreate: Use automatic memory management

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:45:17 +02:00
parent 7bf435fbb0
commit 534874f705

View File

@ -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;
}