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:
parent
1616fbed42
commit
8e350a78b1
@ -237,7 +237,7 @@ ftp_activeconn()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
error = connect(port6, sa, sa->sa_len);
|
error = connect(port6, sa, sa->sa_len);
|
||||||
if (port6 == -1) {
|
if (error < 0) {
|
||||||
close(port6);
|
close(port6);
|
||||||
close(port4);
|
close(port4);
|
||||||
close(wport4);
|
close(wport4);
|
||||||
@ -284,7 +284,7 @@ ftp_passiveconn()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
error = connect(port4, sa, sa->sa_len);
|
error = connect(port4, sa, sa->sa_len);
|
||||||
if (port4 == -1) {
|
if (error < 0) {
|
||||||
close(wport6);
|
close(wport6);
|
||||||
close(port4);
|
close(port4);
|
||||||
close(port6);
|
close(port6);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user