From a5d4c69d6a6a6c2bd23e4f1af97a7ef024973210 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 17 Aug 2017 13:05:08 -0400 Subject: [PATCH] pimd: Fix memory leak on failure case When we fail to create upstream we were not properly cleaning up all memory. Signed-off-by: Donald Sharp --- pimd/pim_upstream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 751611479e..1fc952fdf8 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -698,6 +698,8 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim, if (up->sources) list_delete(up->sources); + list_delete(up->ifchannels); + hash_release(pim->upstream_hash, up); XFREE(MTYPE_PIM_UPSTREAM, up); return NULL; -- 2.39.5