1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

resolve: fix memleak

This commit is contained in:
Yu Watanabe 2018-07-26 17:33:23 +09:00
parent 82296b3e07
commit c0df8f834a

View File

@ -79,7 +79,7 @@ static const struct hash_ops etc_hosts_item_ops = {
};
static int add_item(Manager *m, int family, const union in_addr_union *address, char **names) {
_cleanup_strv_free_ char **dummy = names;
EtcHostsItem key = {
.family = family,
.address = *address,
@ -125,6 +125,8 @@ static int add_item(Manager *m, int family, const union in_addr_union *address,
free(item);
return log_oom();
}
dummy = NULL;
}
}