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

Memory leak #18

Open
steven807 opened this issue Jun 4, 2014 · 2 comments
Open

Memory leak #18

steven807 opened this issue Jun 4, 2014 · 2 comments

Comments

@steven807
Copy link

I think that handle_zframe_recv_nowait has a memory leak. (At least, something does -- this is my best guess as to the problem.) The culprit appears to be in the freeing of terms at the end of the function. There is a call to "erl_free_term(more_boolean)", but "more_boolean" is a pointer to an atom that shouldn't be freed. But there is no free of the tuple, "data_more". I suspect swapping one for the other will fix this leak.

@andytill
Copy link

andytill commented Jun 5, 2014

I can confirm this does in fact fix the memory leak, which is quite serious. Just freeing data_more and not more_boolean consistently crashes the czmq-port process.

Thanks @steven807 !

@steven807
Copy link
Author

Glad to help.

aseigo added a commit to aseigo/erlang-czmq that referenced this issue Dec 23, 2014
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

No branches or pull requests

2 participants