Merge pull request #11400 from anttiylitokola/dns_cleanup_fix

nsapi_dns: cleanup dns queue when running out or memory
pull/11408/head
Anna Bridge 2019-09-03 16:03:07 +01:00 committed by GitHub
commit c7c48193d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -726,6 +726,7 @@ nsapi_value_or_error_t nsapi_dns_query_multiple_async(NetworkStack *stack, const
if (nsapi_dns_call_in(query->call_in_cb, DNS_TIMER_TIMEOUT, mbed::callback(nsapi_dns_query_async_timeout)) != NSAPI_ERROR_OK) {
delete[] query->host;
delete query;
dns_query_queue[index] = NULL;
dns_mutex->unlock();
return NSAPI_ERROR_NO_MEMORY;
}