mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-11 01:06:59 +08:00
Do not call close() twice. Issue spotted by coverity.
This commit is contained in:
@@ -1115,8 +1115,10 @@ int post_auth_handler(worker_st * ws, unsigned http_ver)
|
||||
}
|
||||
|
||||
ret = recv_auth_reply(ws, sd, msg, sizeof(msg));
|
||||
if (sd != -1)
|
||||
if (sd != -1) {
|
||||
close(sd);
|
||||
sd = -1;
|
||||
}
|
||||
|
||||
if (ret == ERR_AUTH_CONTINUE) {
|
||||
oclog(ws, LOG_DEBUG, "continuing authentication for '%s'",
|
||||
@@ -1137,8 +1139,6 @@ int post_auth_handler(worker_st * ws, unsigned http_ver)
|
||||
|
||||
ask_auth:
|
||||
|
||||
if (sd != -1)
|
||||
close(sd);
|
||||
return get_auth_handler(ws, http_ver);
|
||||
|
||||
auth_fail:
|
||||
|
||||
Reference in New Issue
Block a user