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:
85baebd
)
close the socket properly when returning error due to failing localbind
author
Daniel Stenberg
<daniel@haxx.se>
Thu, 17 Feb 2005 14:45:03 +0000
(14:45 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Thu, 17 Feb 2005 14:45:03 +0000
(14:45 +0000)
Bug report #
1124588
by David
lib/connect.c
patch
|
blob
|
history
diff --git
a/lib/connect.c
b/lib/connect.c
index e59e6721e63fe40b1a4dd48713ed61e9a9b057f5..261ab08d843a608dc0b3ceb2ac9e4e7944bac8dc 100644
(file)
--- a/
lib/connect.c
+++ b/
lib/connect.c
@@
-640,8
+640,10
@@
singleipconnect(struct connectdata *conn,
/* user selected to bind the outgoing socket to a specified "device"
before doing connect */
CURLcode res = bindlocal(conn, sockfd);
- if(res)
+ if(res) {
+ sclose(sockfd); /* close socket and bail out */
return res;
+ }
}
/* set socket non-blocking */