mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-06 19:55:32 +00:00
lib: Tweak to if_delete_retain()
* lib/if.c: Change if_delete_retain() to delete all connected
addresses, but to not free the list that holds them. Free the list
just before the interface structure itself is freed, in
if_delete().
This commit is contained in:
parent
af56d404cd
commit
2dd04c5dc8
4
lib/if.c
4
lib/if.c
@ -146,7 +146,7 @@ if_delete_retain (struct interface *ifp)
|
||||
(*if_master.if_delete_hook) (ifp);
|
||||
|
||||
/* Free connected address list */
|
||||
list_delete (ifp->connected);
|
||||
list_delete_all_node (ifp->connected);
|
||||
}
|
||||
|
||||
/* Delete and free interface structure. */
|
||||
@ -157,6 +157,8 @@ if_delete (struct interface *ifp)
|
||||
|
||||
if_delete_retain(ifp);
|
||||
|
||||
list_free (ifp->connected);
|
||||
|
||||
XFREE (MTYPE_IF, ifp);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user