mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 00:15:16 +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
82a32be1d6
commit
09ca7a181b
@ -719,7 +719,7 @@ tcp_seg_copy(struct tcp_seg *seg)
|
||||
return NULL;
|
||||
}
|
||||
memcpy((char *)cseg, (const char *)seg, sizeof(struct tcp_seg));
|
||||
pbuf_ref_chain(cseg->p);
|
||||
pbuf_ref(cseg->p);
|
||||
return cseg;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -687,7 +687,7 @@ struct pbuf *etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pb
|
||||
/* copy PBUF_REF referenced payloads to PBUF_RAM */
|
||||
q = pbuf_take(q);
|
||||
/* pbufs are queued, increase the reference count */
|
||||
pbuf_ref_chain(q);
|
||||
pbuf_ref(q);
|
||||
/* remember pbuf to queue, if any */
|
||||
arp_table[i].p = q;
|
||||
DEBUGF(ETHARP_DEBUG | DBG_TRACE | DBG_STATE, ("etharp_query: queued packet %p on ARP entry %u.\n", (void *)q, i));
|
||||
|
Loading…
Reference in New Issue
Block a user