]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RADIUS server: Do not close fd=0 in error cases
authorJouni Malinen <j@w1.fi>
Sat, 25 May 2019 16:10:08 +0000 (19:10 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 25 May 2019 16:10:08 +0000 (19:10 +0300)
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>
src/radius/radius_server.c

index b621ada554ee918048f3e23e21a005cdcc308542..d352f26eee6fa74c7818807577b79eccb67dd4b9 100644 (file)
@@ -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;