Skip to content

Commit

Permalink
Handle case where log file is not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
userwiths committed Aug 30, 2024
1 parent 94f1871 commit e8ba5b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libfreshclam/libfreshclam.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ const char *fc_strerror(fc_error_t fcerror)

int fc_upsert_logg_file(fc_config *fcConfig)
{
if (fcConfig->logFile == NULL) {
return 0;
}
int ret = 0, field_no = 1;
char *current_path, *file_path = cli_safer_strdup(fcConfig->logFile), *token;
FILE *logg_fp = NULL;
Expand Down

0 comments on commit e8ba5b2

Please sign in to comment.