Commit a5e397a5 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #922 from horus42/master

Fixed potential SEGFAULT in socket_base.cpp
parents 49e035fb 03a3dd25
......@@ -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;
}
......
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