]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: Fix memory leak
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 9 Oct 2017 20:08:45 +0000 (16:08 -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_zebra.c

index bd944ae748868a6778d157b414bbc2113d728332..16f87735beccda75d8c8dbebd425724686929300 100644 (file)
@@ -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;