Bug #2098 fix: SegFault in tunnelConnectTimeout error page generation.
The tunnelConnectTimeout function used the tunnelState object (and propably
the tunnelState->request object) after they were freed by the comm_close call.
The fix moves the comm_close call to the end of tunnelConnectTimeout.
/*
- * $Id: tunnel.cc,v 1.174 2007/09/25 13:23:13 hno Exp $
+ * $Id: tunnel.cc,v 1.175 2007/10/16 14:38:18 rousskov Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
hierarchyNote(&tunnelState->request->hier, tunnelState->servers->code,
tunnelState->host);
- comm_close(fd);
err = errorCon(ERR_CONNECT_FAIL, HTTP_SERVICE_UNAVAILABLE, request);
err->callback_data = tunnelState;
errorSend(tunnelState->client.fd(), err);
+ comm_close(fd);
}
static void