diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-10-22 20:53:07 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-10-23 11:28:12 -0400 |
| commit | 0e7d7358eb9609a87356bbea13e60fc879f02409 (patch) | |
| tree | 13ed6ffacb5f13bf6e3d5b64ffc0cf75f38b66ff /pbrd/pbr_zebra.c | |
| parent | 1e4fa7f46cc1c2d1fcb5c427c2d284bd1110a406 (diff) | |
pbrd: Fix memory leak
On shutdown pbr was leaking the ifp->info ( struct pbr_interface *)
pointer.
Add some code to notice we are being shutdown and cleanup the memory
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pbrd/pbr_zebra.c')
| -rw-r--r-- | pbrd/pbr_zebra.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c index b8ee974635..2a567251b5 100644 --- a/pbrd/pbr_zebra.c +++ b/pbrd/pbr_zebra.c @@ -59,6 +59,11 @@ struct pbr_interface *pbr_if_new(struct interface *ifp) return pbr_ifp; } +void pbr_if_del(struct interface *ifp) +{ + XFREE(MTYPE_PBR_INTERFACE, ifp->info); +} + /* Inteface addition message from zebra. */ int pbr_ifp_create(struct interface *ifp) { |
