From 86a6b8a552247a1f366c3c3973634eec5ab7e646 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Tue, 18 Aug 2015 15:27:14 +0200 Subject: [PATCH] pktbuf: check NULL pointer before merging snips --- sys/net/crosslayer/ng_pktbuf_static/ng_pktbuf_static.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/crosslayer/ng_pktbuf_static/ng_pktbuf_static.c b/sys/net/crosslayer/ng_pktbuf_static/ng_pktbuf_static.c index 58336ab120..3fd322488a 100644 --- a/sys/net/crosslayer/ng_pktbuf_static/ng_pktbuf_static.c +++ b/sys/net/crosslayer/ng_pktbuf_static/ng_pktbuf_static.c @@ -457,7 +457,7 @@ static void _pktbuf_free(void *data, size_t size) 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); } }