mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11400 from anttiylitokola/dns_cleanup_fix
nsapi_dns: cleanup dns queue when running out or memorypull/11408/head
commit
c7c48193d4
|
@ -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) {
|
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->host;
|
||||||
delete query;
|
delete query;
|
||||||
|
dns_query_queue[index] = NULL;
|
||||||
dns_mutex->unlock();
|
dns_mutex->unlock();
|
||||||
return NSAPI_ERROR_NO_MEMORY;
|
return NSAPI_ERROR_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue