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:
parent
7bf435fbb0
commit
534874f705
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user