2003-06-26: Mikael Lonnroth <gml@advancevpn.com>
* ospf_packet.c: (ospf_ls_upd_send_queue_event) clean up list node
and unlock lsa if we break early. (eg packet size too large).
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index e233ce0..89d35c5 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -2708,7 +2708,12 @@
/* Check packet size. */
if (length + delta + ntohs (lsa->data->length) > OSPF_PACKET_MAX (oi))
- break;
+ {
+ /* clean up */
+ list_delete_node (update, node);
+ ospf_lsa_unlock (lsa);
+ break;
+ }
/* Keep pointer to LS age. */
lsah = (struct lsa_header *) (STREAM_DATA (s) + stream_get_putp (s));