mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-10 18:29:27 +00:00
In keeping with pbuf->ref always having the count of the number of pointers
to the particular buffer (and the last rewrite of pbuf_free), changed most pbuf_ref_chain() calls back to pbuf_ref(). I think this was causing some pbuf leaks.
This commit is contained in:
parent
a0d1650876
commit
b484f95228
|
@ -367,7 +367,7 @@ low_level_output(struct netif *netif, struct pbuf *p)
|
|||
|
||||
} else {
|
||||
/* Increment use count on pbuf */
|
||||
pbuf_ref_chain(p);
|
||||
pbuf_ref(p);
|
||||
|
||||
/* Put buffers on descriptor ring, but don't mark them as ready yet */
|
||||
tx_insert_eof = tx_insert_sof = mcf5272->tx_insert;
|
||||
|
|
|
@ -293,7 +293,7 @@ unixif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
|
|||
buf->payload = p->payload;
|
||||
|
||||
if(list_elems(unixif->q) == 0) {
|
||||
pbuf_ref_chain(p);
|
||||
pbuf_ref(p);
|
||||
list_push(unixif->q, buf);
|
||||
sys_timeout((double)p->tot_len * 8000.0 / UNIXIF_BPS, unixif_output_timeout,
|
||||
netif);
|
||||
|
@ -301,7 +301,7 @@ unixif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
|
|||
DEBUGF(UNIXIF_DEBUG, ("unixif_output: first on list\n"));
|
||||
|
||||
} else {
|
||||
pbuf_ref_chain(p);
|
||||
pbuf_ref(p);
|
||||
if(list_push(unixif->q, buf) == 0) {
|
||||
#ifdef UNIXIF_DROP_FIRST
|
||||
struct unixif_buf *buf2;
|
||||
|
|
Loading…
Reference in New Issue
Block a user