mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-01 21:13:13 +01:00
Problem: use-after-free in test_poller
Solution: remove server socket from poller before closing it Fixes #2581
This commit is contained in:
@@ -150,6 +150,10 @@ int main (void)
|
||||
assert (event.socket == server);
|
||||
assert (event.user_data == NULL);
|
||||
assert (event.events == ZMQ_POLLOUT);
|
||||
|
||||
// Stop polling server
|
||||
rc = zmq_poller_remove (poller, server);
|
||||
assert (rc == 0);
|
||||
#endif
|
||||
|
||||
// Destory sockets, poller and ctx
|
||||
|
||||
Reference in New Issue
Block a user