Skip to content
Snippets Groups Projects
Commit 3c710298 authored by Roman Khlopkov's avatar Roman Khlopkov 🔜
Browse files

Memory leak & warning fixed

parent ada7448c
No related branches found
No related tags found
1 merge request!10bugs-3496
......@@ -148,8 +148,8 @@ dap_dns_zone_callback_t dap_dns_zone_find(char *hostname) {
if (!strcmp(hostname, &s_root_alias[0])) {
return NULL;
}
char *zone_up = strchr(hostname, '.') + 1;
if (zone_up == 1) {
char *zone_up = strchr(hostname, '.');
if (zone_up++ == NULL) {
zone_up = &s_root_alias[0];
}
return dap_dns_zone_find(zone_up);
......@@ -326,5 +326,6 @@ void dap_dns_server_stop() {
DAP_DELETE(current_zone);
}
// TODO add code to stop udp_thread
dap_udp_server_delete(s_dns_server->instance);
dap_udp_server_delete(s_dns_server->instance);
DAP_DELETE(s_dns_server);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment