mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-28 14:21:45 +00:00
pbrd: Fix memory leak in json output
Fix a memory leak in using some pbr json commands. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
dc7b85a2f9
commit
c195ae78e9
@ -907,16 +907,22 @@ DEFPY (show_pbr_interface,
|
||||
if (j)
|
||||
this_iface = json_object_new_object();
|
||||
|
||||
if (!ifp->info)
|
||||
if (!ifp->info) {
|
||||
json_object_free(this_iface);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (name && strcmp(ifp->name, name) != 0)
|
||||
if (name && strcmp(ifp->name, name) != 0) {
|
||||
json_object_free(this_iface);
|
||||
continue;
|
||||
}
|
||||
|
||||
pbr_ifp = ifp->info;
|
||||
|
||||
if (strcmp(pbr_ifp->mapname, "") == 0)
|
||||
if (strcmp(pbr_ifp->mapname, "") == 0) {
|
||||
json_object_free(this_iface);
|
||||
continue;
|
||||
}
|
||||
|
||||
pbrm = pbrm_find(pbr_ifp->mapname);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user