1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

pktbuf: check NULL pointer before merging snips

This commit is contained in:
Oleg Hahm 2015-08-18 15:27:14 +02:00
parent 3757e57e71
commit 86a6b8a552

View File

@ -457,7 +457,7 @@ static void _pktbuf_free(void *data, size_t size)
new = _merge(prev, new); new = _merge(prev, new);
} }
} }
if (_too_small_hole(new, new->next)) { if ((new->next != NULL) && (_too_small_hole(new, new->next))) {
_merge(new, new->next); _merge(new, new->next);
} }
} }