diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-11-16 13:54:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 13:54:03 +0100 |
commit | c599ed56fc4c3f8ba16f8dd81bcee5896cea5dc7 (patch) | |
tree | a420f7ba088fff0d8e93f1b79559a224c51c172f | |
parent | Merge pull request #14792 from mobash-rasool/fixes2 (diff) | |
parent | babeld: Free IPv4 Memory in babel_interface_free (diff) | |
download | frr-c599ed56fc4c3f8ba16f8dd81bcee5896cea5dc7.tar.xz frr-c599ed56fc4c3f8ba16f8dd81bcee5896cea5dc7.zip |
Merge pull request #14807 from Keelan10/fix-babel-int-delete-leak
babeld: Free IPv4 Memory in babel_interface_free
-rw-r--r-- | babeld/babel_interface.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index 2cf670712..854c73acc 100644 --- a/babeld/babel_interface.c +++ b/babeld/babel_interface.c @@ -695,8 +695,10 @@ interface_reset(struct interface *ifp) babel_ifp->cost, babel_ifp->ipv4 ? ", IPv4" : ""); - if (babel_ifp->ipv4 != NULL) + if (babel_ifp->ipv4 != NULL){ free(babel_ifp->ipv4); + babel_ifp->ipv4 = NULL; + } return 1; } @@ -1348,5 +1350,9 @@ babel_interface_allocate (void) static void babel_interface_free (babel_interface_nfo *babel_ifp) { + if (babel_ifp->ipv4){ + free(babel_ifp->ipv4); + babel_ifp->ipv4 = NULL; + } XFREE(MTYPE_BABEL_IF, babel_ifp); } |