]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: ospf_route.c memory leak fix
authorryndia <dindyalsarvesh@gmail.com>
Wed, 26 Apr 2023 14:52:49 +0000 (18:52 +0400)
committerryndia <dindyalsarvesh@gmail.com>
Tue, 30 May 2023 16:44:30 +0000 (20:44 +0400)
The rn variable has its info attribute being replaced with a new ospf route before being freed properly.

Signed-off-by: ryndia <dindyalsarvesh@gmail.com>
ospfd/ospf_route.c

index 75868056adb31c51aa6d8def2ed3acfc670eb91e..cdb1eb00954342f34a1a49cd88f48b507b462769 100644 (file)
@@ -684,6 +684,8 @@ void ospf_intra_add_stub(struct route_table *rt, struct router_lsa_link *link,
                                           __func__);
                }
        }
+       if (rn->info)
+               ospf_route_free(rn->info);
 
        rn->info = or ;