0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 01:37:56 +08:00

Problem: use-after-free in test_poller

Solution: remove server socket from poller before closing it
Fixes #2581
This commit is contained in:
Luca Boccassi 2017-05-18 13:10:00 +01:00
parent bc8ad8860b
commit 17637536b8

View File

@ -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