Skip to content

cmdufrag: fix memory leaks

Make sure that fragments passed to cmdufrag_queue_enqueue() always get freed eventually, regardless of their fate, regardless of whether reassembly is successful or there are missing fragments, duplicate fragments, etc.

Do not keep track of latest allocated CMDU in struct i1905_interface_private as this is now redundant and never really worked as there can be more than one outstanding fragment at a time. This is also needed to avoid the risk of a double free.

Fix memory leaks in failure paths in i1905_cmdu_fragment_and_tx, i1905_recv_1905 and i1905_recv_lldp

Edited by Erik Karlsson - Genexis

Merge request reports