From: Donald Sharp Date: Mon, 9 Oct 2017 20:08:45 +0000 (-0400) Subject: ospfd: Fix memory leak X-Git-Tag: frr-4.0-dev~219^2~4 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a68730c62aa88a6c4770de0c72558555f8c7a211;p=matthieu%2Ffrr.git ospfd: Fix memory leak Signed-off-by: Donald Sharp --- diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index bd944ae748..16f87735be 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -1134,12 +1134,16 @@ void ospf_distribute_list_update(struct ospf *ospf, int type, /* External info does not exist. */ ext = ospf_external_lookup(type, instance); - if (!ext || !(rt = EXTERNAL_INFO(ext))) + if (!ext || !(rt = EXTERNAL_INFO(ext))) { + XFREE(MTYPE_OSPF_DIST_ARGS, args); return; + } /* If exists previously invoked thread, then let it continue. */ - if (ospf->t_distribute_update) + if (ospf->t_distribute_update) { + XFREE(MTYPE_OSPF_DIST_ARGS, args); return; + } /* Set timer. */ ospf->t_distribute_update = NULL;