Skip to content

Conversation

jweigelt
Copy link
Contributor

If _handler is set, pbuf_free is not called. ~AsyncUDPPacket() calls pbuf_free once but only after calling pbuf_ref in it's constructor. The refcount never reaches zero and the memory allocated for pbuf is never released.

If _handler is set, pbuf_free is not called. ~AsyncUDPPacket() calls pbuf_free once but only after calling pbuf_ref in it's constructor. The refcount never reaches zero and the memory allocated for pbuf is never released.
@me-no-dev
Copy link
Member

aahhh!!! nice find! maybe just not ref in the constructor. I think that is a better option?

@me-no-dev
Copy link
Member

Thought of it, you are correct :) this is a better way. Merging..

@me-no-dev me-no-dev merged commit a87b2ec into espressif:master Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants