Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential leak in TCPEndPoint::LwIPHandleDataReceived (#11447)
#### Problem `TCPEndPoint::LwIPHandleDataReceived()` receives a packet buffer and, in the normal case, forwards its ownership via `PostEvent()`. If that fails, `LwIPHandleDataReceived()` is responsible for freeing the pbuf, but doesn't. From LwIP documentation, “If the callback function returns ERR_OK or ERR_ABRT it must have freed the pbuf”. #### Change overview Call `pbuf_free()` if `PostEvent()` fails. #### Testing None; we don't have any way to instrument LwIP to verify this.
- Loading branch information