diff options
| author | Sarita Patra <saritap@vmware.com> | 2018-08-16 06:41:01 -0700 |
|---|---|---|
| committer | Sarita Patra <saritap@vmware.com> | 2018-08-16 12:15:26 -0700 |
| commit | 1159c202fcf674f42becc489d5ac3e973a1284f1 (patch) | |
| tree | cddc3bbbdb29232cd3052ba8b87a98be307634e8 | |
| parent | f5bffa5a7435696780d8a7f1ebe842e4cd7b3af4 (diff) | |
pimd: Fix memory leak pim nexthop creation
While terminating pim instance, the memory allocated for pim nexthop
should be released before deallocating the memory of pim nexthop cache(pnc).
This resolves the memory leak detected in pnc->nexthop creation.
Signed-off-by: Sarita Patra <saritap@vmware.com>
| -rw-r--r-- | pimd/pim_rp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 3b3e5eb693..515fb5d077 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -56,6 +56,8 @@ void pim_rp_list_hash_clean(void *data) hash_clean(pnc->upstream_hash, NULL); hash_free(pnc->upstream_hash); pnc->upstream_hash = NULL; + if (pnc->nexthop) + nexthops_free(pnc->nexthop); XFREE(MTYPE_PIM_NEXTHOP_CACHE, pnc); } |
