netdb/lib_dnsquery.c: In the IPv6 or IPv4 dns_query_callback() block,

if dns_recv_response() fails, dns_bind() is called again at try_stream to
create a new socket. However, the original socket descriptor sd isn't closed

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
This commit is contained in:
nuttxs 2025-06-23 17:55:44 +08:00 committed by Alan C. Assis
parent 21e8bfaab4
commit 26e02700dd

View file

@ -902,6 +902,7 @@ try_stream:
{
if (!stream && should_try_stream)
{
close(sd); /* Close current socket before trying stream mode */
stream = true;
goto try_stream; /* Don't consume retry count */
}
@ -961,6 +962,7 @@ try_stream:
{
if (!stream && should_try_stream)
{
close(sd); /* Close current socket before trying stream mode */
stream = true;
goto try_stream; /* Don't consume retry count */
}