diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-03-08 15:56:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-08 15:56:19 +0100 |
commit | f8e23dc921c3fa4fd925d687f9a14bf3c81d0cb6 (patch) | |
tree | c0da0e98f347b52a79ebfd844935f51f7bad1984 /staticd | |
parent | Merge pull request #5915 from donaldsharp/more_more_more (diff) | |
parent | staticd: Fixing memory leak issue (diff) | |
download | frr-f8e23dc921c3fa4fd925d687f9a14bf3c81d0cb6.tar.xz frr-f8e23dc921c3fa4fd925d687f9a14bf3c81d0cb6.zip |
Merge pull request #5933 from rgirada/frr-static
staticd: Fixing memory leak issue
Diffstat (limited to 'staticd')
-rw-r--r-- | staticd/static_main.c | 2 | ||||
-rw-r--r-- | staticd/static_vrf.c | 6 | ||||
-rw-r--r-- | staticd/static_vrf.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/staticd/static_main.c b/staticd/static_main.c index 43cb7db51..3aa8a8db3 100644 --- a/staticd/static_main.c +++ b/staticd/static_main.c @@ -73,6 +73,8 @@ static void sigint(void) { zlog_notice("Terminating on signal"); + static_vrf_terminate(); + exit(0); } diff --git a/staticd/static_vrf.c b/staticd/static_vrf.c index abb64aad3..6c065932a 100644 --- a/staticd/static_vrf.c +++ b/staticd/static_vrf.c @@ -111,6 +111,7 @@ static int static_vrf_delete(struct vrf *vrf) svrf->stable[afi][safi] = NULL; } } + XFREE(MTYPE_TMP, svrf); return 0; } @@ -204,3 +205,8 @@ void static_vrf_init(void) vrf_cmd_init(static_vrf_config_write, &static_privs); } + +void static_vrf_terminate(void) +{ + vrf_terminate(); +} diff --git a/staticd/static_vrf.h b/staticd/static_vrf.h index 28fcdd0d3..6951e5671 100644 --- a/staticd/static_vrf.h +++ b/staticd/static_vrf.h @@ -35,4 +35,5 @@ void static_vrf_init(void); struct route_table *static_vrf_static_table(afi_t afi, safi_t safi, struct static_vrf *svrf); +extern void static_vrf_terminate(void); #endif |