summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_te.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-10-09 22:09:23 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-10-10 18:31:36 +0200
commit0760d3c963cd2918982cb6341db04df394dfab39 (patch)
tree70684840918059cfa5389222830f79ec10914e79 /ospfd/ospf_te.c
parentospfd: Fix memory leak (diff)
downloadfrr-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.c4
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 {