]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-radv: fix memleak 13939/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 5 Nov 2019 04:30:00 +0000 (13:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 5 Nov 2019 04:30:00 +0000 (13:30 +0900)
src/libsystemd-network/sd-radv.c

index 5c7f727faa69bff79965c05e49b74e275788bc37..873a2f40f84363182fb8ef066bd908c7455b9c5e 100644 (file)
@@ -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);