mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-14 11:06:59 +01:00
Fixed potential SEGFAULT.
This commit is contained in:
parent
b63c5e5469
commit
79b81f4840
@ -121,10 +121,13 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_,
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
alloc_assert (s);
|
||||
if (s->mailbox.get_fd () == retired_fd)
|
||||
|
||||
if (s->mailbox.get_fd () == -1)
|
||||
{
|
||||
delete s;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user