projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
307d0ef
)
Gautam Mani found a socket descriptor leak that happened when FTP transfers
author
Daniel Stenberg
<daniel@haxx.se>
Mon, 10 Jun 2002 12:34:04 +0000
(12:34 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 10 Jun 2002 12:34:04 +0000
(12:34 +0000)
failed and you reinvoked curl_easy_perform().
lib/transfer.c
patch
|
blob
|
history
diff --git
a/lib/transfer.c
b/lib/transfer.c
index
dac5dee
..
6e0b9e6
100644
(file)
--- a/
lib/transfer.c
+++ b/
lib/transfer.c
@@
-1414,6
+1414,13
@@
CURLcode Curl_perform(struct SessionHandle *data)
if(!res && res2)
res = res2;
+ if(conn && (-1 !=conn->secondarysocket)) {
+ /* if we failed anywhere, we must clean up the secondary socket if it
+ was used */
+ sclose(conn->secondarysocket);
+ conn->secondarysocket=-1;
+ }
+
return res;
}