Merge pull request #857 from simonduq/fix-queuebuf
Added missing memb_free in queuebuf.c
This commit is contained in:
commit
fb05d22623
|
@ -366,6 +366,7 @@ queuebuf_new_from_packetbuf(void)
|
||||||
#else
|
#else
|
||||||
if(buf->ram_ptr == NULL) {
|
if(buf->ram_ptr == NULL) {
|
||||||
PRINTF("queuebuf_new_from_packetbuf: could not queuebuf data\n");
|
PRINTF("queuebuf_new_from_packetbuf: could not queuebuf data\n");
|
||||||
|
memb_free(&bufmem, buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
buframptr = buf->ram_ptr;
|
buframptr = buf->ram_ptr;
|
||||||
|
@ -389,9 +390,9 @@ queuebuf_new_from_packetbuf(void)
|
||||||
PRINTF("queuebuf len %d\n", queuebuf_len);
|
PRINTF("queuebuf len %d\n", queuebuf_len);
|
||||||
printf("#A q=%d\n", queuebuf_len);
|
printf("#A q=%d\n", queuebuf_len);
|
||||||
if(queuebuf_len == queuebuf_max_len + 1) {
|
if(queuebuf_len == queuebuf_max_len + 1) {
|
||||||
memb_free(&bufmem, buf);
|
queuebuf_free(buf);
|
||||||
queuebuf_len--;
|
queuebuf_len--;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif /* QUEUEBUF_STATS */
|
#endif /* QUEUEBUF_STATS */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue