diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-07-26 17:33:23 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-07-26 17:45:34 +0900 |
commit | c0df8f834aec7ca7ae3737813c487566a90b873a (patch) | |
tree | 2aae5af3e5c98fdd9a2845b9e54c3fe6888d74e2 /src | |
parent | 82296b3e0730fc087faf552fcfd5657419cf22bc (diff) | |
download | systemd-c0df8f834aec7ca7ae3737813c487566a90b873a.tar.gz |
resolve: fix memleak
Diffstat (limited to 'src')
-rw-r--r-- | src/resolve/resolved-etc-hosts.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resolve/resolved-etc-hosts.c b/src/resolve/resolved-etc-hosts.c index 507f68b47f..08591661f6 100644 --- a/src/resolve/resolved-etc-hosts.c +++ b/src/resolve/resolved-etc-hosts.c @@ -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; } } |