mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-29 16:45:51 +08:00
ZMQII-53: Memory leak when using invalid socket type
This commit is contained in:
parent
a1e70f2957
commit
5d16070ffc
@ -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 ()
|
||||
|
Loading…
x
Reference in New Issue
Block a user