aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-05-25 16:10:08 (GMT)
committerJouni Malinen <j@w1.fi>2019-05-25 16:10:08 (GMT)
commitbaf8ab8ceca0f71c694fecc4fe286a9f3b767329 (patch)
tree7714943d9c4c6b09195cf75b5940d7986d210d93
parentf82a8408789ed1bc9b5ec0f28e74c74c141013a4 (diff)
downloadhostap-baf8ab8ceca0f71c694fecc4fe286a9f3b767329.zip
hostap-baf8ab8ceca0f71c694fecc4fe286a9f3b767329.tar.gz
hostap-baf8ab8ceca0f71c694fecc4fe286a9f3b767329.tar.bz2
RADIUS server: Do not close fd=0 in error cases
Initialize auth_sock and acct_sock to -1 to avoid radius_server_deinit() attempting to close fd=0 if anything fails in setting up the RADIUS server. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--src/radius/radius_server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/radius/radius_server.c b/src/radius/radius_server.c
index b621ada..d352f26 100644
--- a/src/radius/radius_server.c
+++ b/src/radius/radius_server.c
@@ -2348,6 +2348,8 @@ radius_server_init(struct radius_server_conf *conf)
if (data == NULL)
return NULL;
+ data->auth_sock = -1;
+ data->acct_sock = -1;
dl_list_init(&data->erp_keys);
os_get_reltime(&data->start_time);
data->conf_ctx = conf->conf_ctx;