[mod_enum] fix mem leak - ldns_resolver_new() - vanilla cfg.

This commit is contained in:
Dragos Oancea committed 2021-03-16 14:46:39 +00:00
1 parent 2c2f2f9606
commit b775c1f91a
1 file changed
+3
+3
View File
@@ -496,6 +496,9 @@ switch_status_t ldns_lookup(const char *number, const char *root, char *server_n
if (!added_server) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No Nameservers specified, using host default\n");
/* create a new resolver from /etc/resolv.conf */
if (res) {
ldns_resolver_free(res);
}
s = ldns_resolver_new_frm_file(&res, NULL);
}