diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 37b2e652..29384b69 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -525,7 +525,7 @@ tcpip_init(void (* initfunc)(void *), void *arg) * @param p The pbuf (chain) to be dereferenced. */ static void -pub_free_int(void *p) +pbuf_free_int(void *p) { struct pbuf *q = p; pbuf_free(q); @@ -540,7 +540,7 @@ pub_free_int(void *p) err_t pbuf_free_callback(struct pbuf *p) { - return tcpip_callback_with_block(pub_free_int, p, 0); + return tcpip_callback_with_block(pbuf_free_int, p, 0); } /** diff --git a/src/include/lwip/tcpip.h b/src/include/lwip/tcpip.h index cb0fe0eb..0d295641 100644 --- a/src/include/lwip/tcpip.h +++ b/src/include/lwip/tcpip.h @@ -85,6 +85,7 @@ err_t tcpip_netifapi_lock(struct netifapi_msg *netifapimsg); err_t tcpip_callback_with_block(void (*f)(void *ctx), void *ctx, u8_t block); #define tcpip_callback(f, ctx) tcpip_callback_with_block(f, ctx, 1) +/* free pbufs or heap memory from another context without blocking */ err_t pbuf_free_callback(struct pbuf *p); err_t mem_free_callback(void *m);