Skip to content

Commit

Permalink
errorlog: Check errorfile exists
Browse files Browse the repository at this point in the history
Fixes #6027
  • Loading branch information
orestisfl committed Apr 28, 2024
1 parent 5834b7e commit 6ba76d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions release-notes/bugfixes/99-errorlog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix error log related crash
3 changes: 3 additions & 0 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ void errorlog(char *fmt, ...) {
va_end(args);

/* also log to the error logfile, if opened */
if (!errorfile) {
return;
}
va_start(args, fmt);
vfprintf(errorfile, fmt, args);
fflush(errorfile);
Expand Down

0 comments on commit 6ba76d2

Please sign in to comment.