]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: Fix leak of stream
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 9 Oct 2017 20:09:23 +0000 (16:09 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 10 Oct 2017 16:31:36 +0000 (12:31 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd/ospf_te.c

index 5f300dabaec90bac42a30ec29227542166ec7984..392df5fb40055d17f6fa6941750ccdb07f009371 100644 (file)
@@ -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 {