Commit 5d16070f authored by Martin Sustrik's avatar Martin Sustrik

ZMQII-53: Memory leak when using invalid socket type

parent a1e70f29
......@@ -134,11 +134,15 @@ zmq::socket_base_t *zmq::dispatcher_t::create_socket (int type_)
}
threads_sync.unlock ();
socket_base_t *s = thread->create_socket (type_);
if (!s)
return NULL;
term_sync.lock ();
sockets++;
term_sync.unlock ();
return thread->create_socket (type_);
return s;
}
void zmq::dispatcher_t::destroy_socket ()
......
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