Permalink
Browse files

Merge remote-tracking branch 'origin/patches-2.0'

  • Loading branch information...
2 parents 49905ac + 0a822a6 commit 21c962e0877698a8118fe4a68ef0e42905978edf Nick Mathewson committed Dec 20, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −1 evutil.c
  2. +1 −0 listener.c
View
@@ -270,7 +270,6 @@ evutil_ersatz_socketpair_(int family, int type, int protocol,
goto tidy_up_and_fail;
if (size != sizeof(listen_addr))
goto abort_tidy_up_and_fail;
- evutil_closesocket(listener);
/* Now check we are talking to ourself by matching port and host on the
two sockets. */
if (getsockname(connector, (struct sockaddr *) &connect_addr, &size) == -1)
@@ -280,6 +279,7 @@ evutil_ersatz_socketpair_(int family, int type, int protocol,
|| listen_addr.sin_addr.s_addr != connect_addr.sin_addr.s_addr
|| listen_addr.sin_port != connect_addr.sin_port)
goto abort_tidy_up_and_fail;
+ evutil_closesocket(listener);
fd[0] = connector;
fd[1] = acceptor;
View
@@ -402,6 +402,7 @@ listener_read_cb(evutil_socket_t fd, short what, void *p)
}
if (lev->cb == NULL) {
+ evutil_closesocket(new_fd);
UNLOCK(lev);
return;
}

0 comments on commit 21c962e

Please sign in to comment.