Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed transactions cause a memory leak #341

Open
mtusnio opened this issue Feb 8, 2017 · 1 comment
Open

Failed transactions cause a memory leak #341

mtusnio opened this issue Feb 8, 2017 · 1 comment
Labels
Milestone

Comments

@mtusnio
Copy link
Contributor

mtusnio commented Feb 8, 2017

Any failed COAP transactions that get sent with Erbium are added to a list of transactions, however they are never removed. From my experience this is because coap_clear_transaction is never called here: https://github.com/FlowM2M/AwaLWM2M/blob/master/core/src/erbium/er-coap-transactions.c#L98
After a while the malloc in coap_new_transaction start returning NULL due to lack of memory.

However, adding coap_clear_transaction there causes any successful requests to fail since they also go into that branch of the if, so it doesn't seem like it's just an easy fix of adding that in.

@boyvinall
Copy link
Contributor

The transactions should be cleared after MAX_TRANSMIT_SPAN, see http://www.rfcreader.com/#rfc7252_line1260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants