Skip to content

Commit 1708ec2

Browse files
author
Antti Yli-Tokola
committed
nsapi_dns: cleanup dns queue when running out or memory
1 parent 525d3cc commit 1708ec2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

features/netsocket/nsapi_dns.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ nsapi_value_or_error_t nsapi_dns_query_multiple_async(NetworkStack *stack, const
726726
if (nsapi_dns_call_in(query->call_in_cb, DNS_TIMER_TIMEOUT, mbed::callback(nsapi_dns_query_async_timeout)) != NSAPI_ERROR_OK) {
727727
delete[] query->host;
728728
delete query;
729+
dns_query_queue[index] = NULL;
729730
dns_mutex->unlock();
730731
return NSAPI_ERROR_NO_MEMORY;
731732
}

0 commit comments

Comments
 (0)