From: Jorge Pereira Date: Tue, 3 Dec 2019 00:50:15 +0000 (-0300) Subject: Fix mod_event_list_set() to stop if failed to open() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50eddec2e19df31229a3609d7298d5b32ccc519d;p=thirdparty%2Ffreeradius-server.git Fix mod_event_list_set() to stop if failed to open() If failed to open() the file, just report and stop it. --- diff --git a/src/modules/proto_radius/proto_radius_load.c b/src/modules/proto_radius/proto_radius_load.c index 9968853dd3c..749d619af1f 100644 --- a/src/modules/proto_radius/proto_radius_load.c +++ b/src/modules/proto_radius/proto_radius_load.c @@ -336,6 +336,7 @@ static void mod_event_list_set(fr_listen_t *li, fr_event_list_t *el, void *nr) thread->fd = open(inst->csv, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0600); if (thread->fd < 0) { ERROR("Failed opening %s - %s", inst->csv, fr_syserror(errno)); + return; } (void) fr_event_timer_in(thread, thread->el, &thread->ev, NSEC, write_stats, thread);