singleipconnect: don't clobber errno
authorDaniel Stenberg <daniel@haxx.se>
Sat, 15 Oct 2011 21:44:28 +0000 (23:44 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 15 Oct 2011 21:44:28 +0000 (23:44 +0200)
commit1a416cd27a37dac23a36063ced06ecc99fcd41e2
tree2186953768b9544e8020e85fc1b5fb78cdf24e34
parent54ef47a5a0de388d0ace96cd1c354127888a374d
singleipconnect: don't clobber errno

Save the errno value immediately after a connect() failure so that it
won't get reset to something else before we read it.

Bug: http://curl.haxx.se/mail/lib-2011-10/0066.html
Reported by: Frank Van Uffelen and Fabian Hiernaux
lib/connect.c