MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / netbuf_delete

Function netbuf_delete

components/net/lwip/lwip-2.1.2/src/api/netbuf.c:80–90  ·  view source on GitHub ↗

* @ingroup netbuf * Deallocate a netbuf allocated by netbuf_new(). * * @param buf pointer to a netbuf allocated by netbuf_new() */

Source from the content-addressed store, hash-verified

78 * @param buf pointer to a netbuf allocated by netbuf_new()
79 */
80void
81netbuf_delete(struct netbuf *buf)
82{
83 if (buf != NULL) {
84 if (buf->p != NULL) {
85 pbuf_free(buf->p);
86 buf->p = buf->ptr = NULL;
87 }
88 memp_free(MEMP_NETBUF, buf);
89 }
90}
91
92/**
93 * @ingroup netbuf

Callers 9

recv_rawFunction · 0.70
api_msg.cFile · 0.70
netconn_drainFunction · 0.70
sockets.cFile · 0.70
snmp_netconn_threadFunction · 0.50
drv_ethernet.cFile · 0.50
udpecho_entryFunction · 0.50
tcpecho_entryFunction · 0.50

Calls 2

pbuf_freeFunction · 0.50
memp_freeFunction · 0.50

Tested by 2

udpecho_entryFunction · 0.40
tcpecho_entryFunction · 0.40