Skip to content

Commit

Permalink
core: safety check for freeaddrinfo() param on log_init()
Browse files Browse the repository at this point in the history
- GH #3281

(cherry picked from commit 6438573)
  • Loading branch information
miconda committed Jan 6, 2023
1 parent caf8465 commit 3bddd54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/dprint.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@ void log_init(void)
log_fqdn = strdup (info->ai_canonname);
}

freeaddrinfo (info);
if(info!=NULL) {
freeaddrinfo (info);
}

dprint_init_colors();
}
Expand Down

0 comments on commit 3bddd54

Please sign in to comment.