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>
This commit is contained in:
Jouni Malinen 2019-05-25 19:10:08 +03:00
parent f82a840878
commit baf8ab8cec

View 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;