Skip to content

Commit

Permalink
Ensure we have a valid fname_as_vhost before making a copy of it.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Sep 29, 2022
1 parent 250c5f9 commit 53afe1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ pre_process_log (GLog * glog, char *line, int dry_run) {
else
ret = parse_format (logitem, line, fmt);

if (!glog->piping && conf.fname_as_vhost)
if (!glog->piping && conf.fname_as_vhost && glog->fname_as_vhost)
logitem->vhost = xstrdup(glog->fname_as_vhost);

if (ret || (ret = verify_missing_fields (logitem))) {
Expand Down

0 comments on commit 53afe1e

Please sign in to comment.