erlang-czmq
erlang-czmq copied to clipboard
Memory leak
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.
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 !
Glad to help.