mirror of https://github.com/getdnsapi/getdns.git
context->return_dnssec_status uninitialized
in getdns_context_create. Also fix memory leak on create_default_namespaces error.
This commit is contained in:
parent
9c5d8aa687
commit
a1351147da
|
@ -438,8 +438,10 @@ getdns_context_create_with_extended_memory_functions(
|
|||
|
||||
|
||||
result->resolution_type = GETDNS_RESOLUTION_RECURSING;
|
||||
if(create_default_namespaces(result) != GETDNS_RETURN_GOOD)
|
||||
if(create_default_namespaces(result) != GETDNS_RETURN_GOOD) {
|
||||
getdns_context_destroy(result);
|
||||
return GETDNS_RETURN_GENERIC_ERROR;
|
||||
}
|
||||
|
||||
result->timeout = 5000;
|
||||
result->follow_redirects = GETDNS_REDIRECTS_FOLLOW;
|
||||
|
@ -470,6 +472,7 @@ getdns_context_create_with_extended_memory_functions(
|
|||
result->dns_transport = GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP;
|
||||
result->limit_outstanding_queries = 0;
|
||||
result->has_ta = priv_getdns_parse_ta_file(NULL, NULL);
|
||||
result->return_dnssec_status = GETDNS_EXTENSION_FALSE;
|
||||
if (!result->outbound_requests ||
|
||||
!result->timeouts_by_id ||
|
||||
!result->timeouts_by_time) {
|
||||
|
|
|
@ -552,7 +552,7 @@ create_getdns_response(struct getdns_dns_req * completed_request)
|
|||
completed_request->extensions, "dnssec_return_only_secure");
|
||||
dnssec_return_status = dnssec_return_only_secure || is_extension_set(
|
||||
completed_request->extensions, "dnssec_return_status") ||
|
||||
completed_request->return_dnssec_status == GETDNS_EXTENSION_TRUE;
|
||||
completed_request->return_dnssec_status == GETDNS_EXTENSION_TRUE;
|
||||
|
||||
if (completed_request->first_req->request_class == GETDNS_RRTYPE_A ||
|
||||
completed_request->first_req->request_class ==
|
||||
|
|
Loading…
Reference in New Issue