[riot-notifications] [RIOT] no memory left in handle_packet_fragment - when there still is plenty of memory left (#299)
notifications at github.com
Tue Nov 5 00:24:52 CET 2013
There are several strange things about the custom list implementation in lowpan.c:
e.g. in `check_timeout()` (https://github.com/RIOT-OS/RIOT/blob/master/sys/net/sixlowpan/lowpan.c#L634)
What happens when temp_buf points to head and gets freed - head will now still point to the old, invalid location.
Actually, head is never updated it seems.
That would explain why it leaks memory and occasionally crashes.
e.g. assuming the following list:
[expired] -> [valid] -> [valid]
null [valid] -> [valid]
I guess the original intention was that new packets are always added to the head, so only the tail expires, but looking at https://github.com/RIOT-OS/RIOT/blob/master/sys/net/sixlowpan/lowpan.c#L422 shows that this is not true.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications