From 4b6ba9692612a992991d0c72bf8e1fa67655a9db Mon Sep 17 00:00:00 2001 From: Jorge Arellano Cid Date: Sat, 1 Oct 2011 11:09:01 -0300 Subject: Minor changes in use-after-free patch to match the CCC handling style --- src/IO/http.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/IO/http.c b/src/IO/http.c index a9db1668..0c34a6b6 100644 --- a/src/IO/http.c +++ b/src/IO/http.c @@ -171,12 +171,11 @@ static void Http_connect_queued_sockets(HostConnection_t *hc) } else if (a_Web_valid(sd->web)) { /* start connecting the socket */ if (Http_connect_socket(sd->Info) < 0) { - int localkey = VOIDP2INT(sd->Info->LocalKey); - + ChainLink *Info = sd->Info; MSG_BW(sd->web, 1, "ERROR: %s", dStrerror(sd->Err)); - a_Chain_bfcb(OpAbort, sd->Info, NULL, "Both"); - dFree(sd->Info); - Http_socket_free(localkey); + a_Chain_bfcb(OpAbort, Info, NULL, "Both"); + Http_socket_free(VOIDP2INT(Info->LocalKey)); /* free sd */ + dFree(Info); } else { sd->connected_to = hc->host; hc->active_connections++; -- cgit v1.2.3