]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Fix memory leak on failure case
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 17 Aug 2017 17:05:08 +0000 (13:05 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 17 Aug 2017 17:05:08 +0000 (13:05 -0400)
When we fail to create upstream we were not properly
cleaning up all memory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_upstream.c

index 751611479ec770cf4d43e63dc38fb57b85ba2956..1fc952fdf85f99ec42c937d3c1f0203bd208ed16 100644 (file)
@@ -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;