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

Fix for potential memory leak in monitor_t::check_event #482

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

kevle
Copy link
Contributor

@kevle kevle commented Mar 6, 2021

The objects eventMsg and addrMsg have the type zmq_msg_t.
Since the event handlers might throw, this could have caused a leak of data associated with eventMsg.
For addrMsg, the constructor of std::string could have thrown ( although this is unlikely ).

This PR replaces raw zmq_msg_t objects with zmq::message_t objects in monitor_t::check_event.

Solution: Use zmq::message_t
@gummif
Copy link
Member

gummif commented Mar 9, 2021

Looks good to me.

@sigiesec sigiesec merged commit dc4c065 into zeromq:master Mar 10, 2021
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.

None yet

3 participants