summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospfd/ospf_packet.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index e233ce0c..89d35c58 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -2708,7 +2708,12 @@ ospf_make_ls_upd (struct ospf_interface *oi, list update, struct stream *s)
/* 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));