Commit 17637536 authored by Luca Boccassi's avatar Luca Boccassi

Problem: use-after-free in test_poller

Solution: remove server socket from poller before closing it
Fixes #2581
parent bc8ad886
...@@ -150,6 +150,10 @@ int main (void) ...@@ -150,6 +150,10 @@ int main (void)
assert (event.socket == server); assert (event.socket == server);
assert (event.user_data == NULL); assert (event.user_data == NULL);
assert (event.events == ZMQ_POLLOUT); assert (event.events == ZMQ_POLLOUT);
// Stop polling server
rc = zmq_poller_remove (poller, server);
assert (rc == 0);
#endif #endif
// Destory sockets, poller and ctx // Destory sockets, poller and ctx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment