mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_pktbuf_static: fix marking of pktsnips with short payload
This commit is contained in:
parent
b254889b2b
commit
e5c6e3da54
@ -113,7 +113,8 @@ gnrc_pktsnip_t *gnrc_pktbuf_mark(gnrc_pktsnip_t *pkt, size_t size, gnrc_nettype_
|
||||
mutex_unlock(&_mutex);
|
||||
return NULL;
|
||||
}
|
||||
if (size < required_new_size) { /* would not fit unused marker => move data around */
|
||||
/* would not fit unused marker => move data around */
|
||||
if ((size < required_new_size) || ((pkt->size - size) < sizeof(_unused_t))) {
|
||||
void *new_data_marked, *new_data_rest;
|
||||
new_data_marked = _pktbuf_alloc(size);
|
||||
if (new_data_marked == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user