1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #3236 from haukepetersen/ng_fix_frag_pktbufcheck

net/ng_sixlowpan: fix check of pktbuf return val
This commit is contained in:
René Kijewski 2015-06-23 02:04:04 +02:00
commit 66b23c149d

View File

@ -302,14 +302,13 @@ static rbuf_t *_rbuf_get(const void *src, size_t src_len,
if (res != NULL) { /* entry not in buffer but found empty spot */
res->pkt = ng_pktbuf_add(NULL, NULL, size, NG_NETTYPE_SIXLOWPAN);
*((uint64_t *)res->pkt->data) = 0; /* clean first few bytes for later
* look-ups */
if (res->pkt == NULL) {
DEBUG("6lo rfrag: can not allocate reassembly buffer space.\n");
return NULL;
}
*((uint64_t *)res->pkt->data) = 0; /* clean first few bytes for later
* look-ups */
res->arrival = now.seconds;
memcpy(res->src, src, src_len);
memcpy(res->dst, dst, dst_len);