Merge pull request #2010 from pi-hole/fix/rev-servers-crash
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled

Fix rev-server crash
This commit is contained in:
yubiuser
2024-07-15 08:32:22 +02:00
committed by GitHub
2 changed files with 10 additions and 5 deletions
+6
View File
@@ -732,6 +732,12 @@ bool __attribute__((const)) write_dnsmasq_config(struct config *conf, bool test_
{
log_warn("New dnsmasq configuration is not valid (%s), config remains unchanged", errbuf);
if(debug_flags[DEBUG_ANY])
{
log_debug(DEBUG_ANY, "Temporary dnsmasq config file left in place for debugging purposes");
return false;
}
// Remove temporary config file
if(remove(DNSMASQ_TEMP_CONF) != 0)
{
+4 -5
View File
@@ -1193,10 +1193,10 @@ static char *domain_rev4(int from_file, char *server, struct in_addr *addr4, int
return _("error");
}
if (sdetails.orig_hostinfo)
freeaddrinfo(sdetails.orig_hostinfo);
}
}
if (sdetails.orig_hostinfo)
freeaddrinfo(sdetails.orig_hostinfo);
return NULL;
}
@@ -1280,11 +1280,10 @@ static char *domain_rev6(int from_file, char *server, struct in6_addr *addr6, in
if (!add_update_server(flags, &serv_addr, &source_addr, interface, domain, NULL))
return _("error");
}
if (sdetails.orig_hostinfo)
freeaddrinfo(sdetails.orig_hostinfo);
}
}
if (sdetails.orig_hostinfo)
freeaddrinfo(sdetails.orig_hostinfo);
return NULL;
}