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

Function netbuf_free

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

* @ingroup netbuf * Free the packet buffer included in a netbuf * * @param buf pointer to the netbuf which contains the packet buffer to free */

Source from the content-addressed store, hash-verified

124 * @param buf pointer to the netbuf which contains the packet buffer to free
125 */
126void
127netbuf_free(struct netbuf *buf)
128{
129 LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;);
130 if (buf->p != NULL) {
131 pbuf_free(buf->p);
132 }
133 buf->p = buf->ptr = NULL;
134#if LWIP_CHECKSUM_ON_COPY
135 buf->flags = 0;
136 buf->toport_chksum = 0;
137#endif /* LWIP_CHECKSUM_ON_COPY */
138}
139
140/**
141 * @ingroup netbuf

Callers 2

lwip_sendmsgFunction · 0.70
lwip_sendtoFunction · 0.70

Calls 1

pbuf_freeFunction · 0.50

Tested by

no test coverage detected