Fix synchronous example to destroy the extensions dict

This commit is contained in:
Neel Goyal 2013-11-04 12:57:46 -05:00
parent 2db5fdbe0c
commit 3da70546ca
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,8 @@ main()
/* Make the call */ /* Make the call */
getdns_return_t dns_request_return = getdns_general_sync(this_context, this_name, this_request_type, getdns_return_t dns_request_return = getdns_general_sync(this_context, this_name, this_request_type,
this_extensions, &this_response_length, &this_response); this_extensions, &this_response_length, &this_response);
/* free the extensions */
getdns_dict_destroy(this_extensions);
if (dns_request_return == GETDNS_RETURN_BAD_DOMAIN_NAME) if (dns_request_return == GETDNS_RETURN_BAD_DOMAIN_NAME)
{ {
fprintf(stderr, "A bad domain name was used: %s. Exiting.", this_name); fprintf(stderr, "A bad domain name was used: %s. Exiting.", this_name);