From: Donald Sharp Date: Mon, 9 Oct 2017 20:09:23 +0000 (-0400) Subject: ospfd: Fix leak of stream X-Git-Tag: frr-4.0-dev~219^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0760d3c963cd2918982cb6341db04df394dfab39;p=mirror%2Ffrr.git ospfd: Fix leak of stream Signed-off-by: Donald Sharp --- diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 5f300dabae..392df5fb40 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -1167,8 +1167,10 @@ static struct ospf_lsa *ospf_mpls_te_lsa_new(struct ospf *ospf, tmp = SET_OPAQUE_LSID(OPAQUE_TYPE_INTER_AS_LSA, lp->instance); lsa_id.s_addr = htonl(tmp); - if (!ospf) + if (!ospf) { + stream_free(s); return NULL; + } lsa_header_set(s, options, lsa_type, lsa_id, ospf->router_id); } else {