mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
Check and free data allocated by fname_after_chroot
git-svn-id: file:///svn/unbound/trunk@3935 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
a6e3ed1025
commit
2dce3856cd
@ -97,7 +97,10 @@ static void
|
||||
print_option(struct config_file* cfg, const char* opt, int final)
|
||||
{
|
||||
if(strcmp(opt, "pidfile") == 0 && final) {
|
||||
printf("%s\n", fname_after_chroot(cfg->pidfile, cfg, 1));
|
||||
char *p = fname_after_chroot(cfg->pidfile, cfg, 1);
|
||||
if(!p) fatal_exit("out of memory");
|
||||
printf("%s\n", p);
|
||||
free(p);
|
||||
return;
|
||||
}
|
||||
if(!config_get_option(cfg, opt, config_print_func, stdout))
|
||||
|
Loading…
Reference in New Issue
Block a user