diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-09 22:09:23 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-10 18:31:36 +0200 |
commit | 0760d3c963cd2918982cb6341db04df394dfab39 (patch) | |
tree | 70684840918059cfa5389222830f79ec10914e79 /ospfd/ospf_te.c | |
parent | ospfd: Fix memory leak (diff) | |
download | frr-0760d3c963cd2918982cb6341db04df394dfab39.tar.xz frr-0760d3c963cd2918982cb6341db04df394dfab39.zip |
ospfd: Fix leak of stream
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_te.c')
-rw-r--r-- | ospfd/ospf_te.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 5f300daba..392df5fb4 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 { |