diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-11-05 13:30:00 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-11-05 13:30:00 +0900 |
commit | 69d7eba1880095f4a9bf9350de777fe7d370c188 (patch) | |
tree | 9a8cf6eacfc22bd6f549ae8e6ad10d6386aeb3e2 /src/libsystemd-network/sd-radv.c | |
parent | c1ed516cde72f9679c9a0d44fe454d85ea4b625f (diff) | |
download | systemd-69d7eba1880095f4a9bf9350de777fe7d370c188.tar.gz systemd-69d7eba1880095f4a9bf9350de777fe7d370c188.tar.bz2 systemd-69d7eba1880095f4a9bf9350de777fe7d370c188.zip |
sd-radv: fix memleak
Diffstat (limited to 'src/libsystemd-network/sd-radv.c')
-rw-r--r-- | src/libsystemd-network/sd-radv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c index 5c7f727faa..873a2f40f8 100644 --- a/src/libsystemd-network/sd-radv.c +++ b/src/libsystemd-network/sd-radv.c @@ -99,6 +99,13 @@ static sd_radv *radv_free(sd_radv *ra) { sd_radv_prefix_unref(p); } + while (ra->route_prefixes) { + sd_radv_route_prefix *p = ra->route_prefixes; + + LIST_REMOVE(prefix, ra->route_prefixes, p); + sd_radv_route_prefix_unref(p); + } + free(ra->rdnss); free(ra->dnssl); |