typo in connect(2) error handling.

Submitted by:	Yukiyo Akisada <Yukiyo.Akisada@jp.yokogawa.com>
Obtained from:	KAME
MFC after:	3 days
This commit is contained in:
Hajimu UMEMOTO 2002-04-24 10:43:40 +00:00
parent ce00aebe22
commit 561ca6a7f6

View File

@ -237,7 +237,7 @@ ftp_activeconn()
return -1;
}
error = connect(port6, sa, sa->sa_len);
if (port6 == -1) {
if (error < 0) {
close(port6);
close(port4);
close(wport4);
@ -284,7 +284,7 @@ ftp_passiveconn()
return -1;
}
error = connect(port4, sa, sa->sa_len);
if (port4 == -1) {
if (error < 0) {
close(wport6);
close(port4);
close(port6);