From b1e74f79c4687025d2fb4e7af19ca53ccb73860e Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Fri, 14 Mar 2014 09:39:56 +0100 Subject: [PATCH] Revert "Fixed potential SEGFAULT." This reverts commit 79b81f48402c1276d4cfd3bf0cbfb4084952b36b. Was causing: Assertion failed: destroyed (socket_base.cpp:154) /bin/bash: line 5: 31344 Aborted ${dir}$tst FAIL: test_many_sockets On TravisCI. --- src/socket_base.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/socket_base.cpp b/src/socket_base.cpp index d0e712f8..630e7981 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -121,13 +121,10 @@ 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 () == -1) - { - delete s; + alloc_assert (s); + if (s->mailbox.get_fd () == retired_fd) return NULL; - } return s; }