net: tests: Fix returning net_buf to free pool
When using a custom destroy callback it's the responsibility of the callback of placing the buffer back in the free pool. Change-Id: I5ff99c32bcb31ccc5eb0fad544d86b0c830e7051 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
dbbe089aa1
commit
118a36fc26
1 changed files with 2 additions and 0 deletions
|
|
@ -44,6 +44,8 @@ static void buf_destroy(struct net_buf *buf)
|
|||
if (buf->free != &bufs_fifo) {
|
||||
printk("Invalid free pointer in buffer!\n");
|
||||
}
|
||||
|
||||
nano_fifo_put(buf->free, buf);
|
||||
}
|
||||
|
||||
static NET_BUF_POOL(bufs_pool, 22, 74, &bufs_fifo, buf_destroy,
|
||||
|
|
|
|||
Loading…
Reference in a new issue