mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-29 16:24:55 +00:00
Merge pull request #14807 from Keelan10/fix-babel-int-delete-leak
babeld: Free IPv4 Memory in babel_interface_free
This commit is contained in:
commit
c599ed56fc
@ -695,8 +695,10 @@ interface_reset(struct interface *ifp)
|
|||||||
babel_ifp->cost,
|
babel_ifp->cost,
|
||||||
babel_ifp->ipv4 ? ", IPv4" : "");
|
babel_ifp->ipv4 ? ", IPv4" : "");
|
||||||
|
|
||||||
if (babel_ifp->ipv4 != NULL)
|
if (babel_ifp->ipv4 != NULL){
|
||||||
free(babel_ifp->ipv4);
|
free(babel_ifp->ipv4);
|
||||||
|
babel_ifp->ipv4 = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1348,5 +1350,9 @@ babel_interface_allocate (void)
|
|||||||
static void
|
static void
|
||||||
babel_interface_free (babel_interface_nfo *babel_ifp)
|
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);
|
XFREE(MTYPE_BABEL_IF, babel_ifp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user