From: Donald Sharp Date: Thu, 17 Aug 2017 17:05:08 +0000 (-0400) Subject: pimd: Fix memory leak on failure case X-Git-Tag: frr-4.0-dev~399^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a5d4c69d6a6a6c2bd23e4f1af97a7ef024973210;p=mirror%2Ffrr.git 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 --- 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;