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:
Johan Hedberg 2016-06-05 17:55:27 +03:00
parent dbbe089aa1
commit 118a36fc26

View file

@ -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,