diff --git a/inc/pbuf.h b/inc/pbuf.h index b44d18a..a89ff4a 100644 --- a/inc/pbuf.h +++ b/inc/pbuf.h @@ -129,20 +129,18 @@ } } -/* -inline void pbuf_free_queue(pbuf_t *queue) + +static inline void pbuf_free_queue(pbuf_t* queue) { while(queue) { pbuf_t *p = queue; queue = queue->next; - //free the pbuf - p->next = p->pool->free_list; //add it back to the free list - p->pool->free_list = p; + pbuf_free(p); } } -*/ + #ifdef __cplusplus }