context->return_dnssec_status uninitialized

in getdns_context_create.

Also fix memory leak on create_default_namespaces error.
This commit is contained in:
Willem Toorop 2014-03-07 11:18:23 +01:00
parent 9c5d8aa687
commit a1351147da
2 changed files with 5 additions and 2 deletions

View File

@ -438,8 +438,10 @@ getdns_context_create_with_extended_memory_functions(
result->resolution_type = GETDNS_RESOLUTION_RECURSING; 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; return GETDNS_RETURN_GENERIC_ERROR;
}
result->timeout = 5000; result->timeout = 5000;
result->follow_redirects = GETDNS_REDIRECTS_FOLLOW; 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->dns_transport = GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP;
result->limit_outstanding_queries = 0; result->limit_outstanding_queries = 0;
result->has_ta = priv_getdns_parse_ta_file(NULL, NULL); result->has_ta = priv_getdns_parse_ta_file(NULL, NULL);
result->return_dnssec_status = GETDNS_EXTENSION_FALSE;
if (!result->outbound_requests || if (!result->outbound_requests ||
!result->timeouts_by_id || !result->timeouts_by_id ||
!result->timeouts_by_time) { !result->timeouts_by_time) {