diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-01 13:46:36 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-01 13:46:38 +0100 |
commit | 744faf5e4e64e26181f03d1d9fa292ce6fb1456a (patch) | |
tree | ab53ccfde9ccac925bca38f585d8bb8bb3c2fc1b /src/network/networkd-radv.c | |
parent | network: fix segfault in manager_free() (diff) | |
download | systemd-744faf5e4e64e26181f03d1d9fa292ce6fb1456a.tar.xz systemd-744faf5e4e64e26181f03d1d9fa292ce6fb1456a.zip |
network: fix memleak in static prefix
Fixes #10608.
Diffstat (limited to 'src/network/networkd-radv.c')
-rw-r--r-- | src/network/networkd-radv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/networkd-radv.c b/src/network/networkd-radv.c index c7d6ac2558..9b393d82a0 100644 --- a/src/network/networkd-radv.c +++ b/src/network/networkd-radv.c @@ -92,9 +92,11 @@ void prefix_free(Prefix *prefix) { assert(prefix->network->n_static_prefixes > 0); prefix->network->n_static_prefixes--; - if (prefix->section) + if (prefix->section) { hashmap_remove(prefix->network->prefixes_by_section, prefix->section); + network_config_section_free(prefix->section); + } } prefix->radv_prefix = sd_radv_prefix_unref(prefix->radv_prefix); |