mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-04 02:56:54 +00:00
Merge pull request #5055 from pguibert6WIND/fix_memory_leak_with_delete_interface
zebra: fix memory leak
This commit is contained in:
commit
dd38ed3502
@ -270,8 +270,10 @@ struct interface *if_lookup_by_name_per_ns(struct zebra_ns *ns,
|
||||
|
||||
for (rn = route_top(ns->if_table); rn; rn = route_next(rn)) {
|
||||
ifp = (struct interface *)rn->info;
|
||||
if (ifp && strcmp(ifp->name, ifname) == 0)
|
||||
if (ifp && strcmp(ifp->name, ifname) == 0) {
|
||||
route_unlock_node(rn);
|
||||
return (ifp);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user