Shanks0224 commented on code in PR #22182:
URL: https://github.com/apache/nuttx/pull/22182#discussion_r4676147183
##########
libs/libc/netdb/lib_getaddrinfo.c:
##########
@@ -476,9 +492,15 @@ int getaddrinfo(FAR const char *hostname, FAR const char
*servname,
return EAI_MEMORY;
}
+ /* The DNS lookup is a cancellation point: free the buffer if the
+ * thread is cancelled there.
+ */
+
+ tls_cleanup_push(tls_get_info(), getaddrinfo_free, hostbuffer);
Review Comment:
Done: tls_cleanup_push() no longer asserts. With DEBUG_ASSERTIONS,
TLS_NCLEANUP=1, and TLS_NCLEANUP=2 with NETDB_RESOLVCONF, getaddrinfo() of a
host name returns without an assertion. getaddrinfo_a() moved to #22242 under a
new option NETDB_GETADDRINFO_A that depends on CANCELLATION_POINTS and
TLS_NCLEANUP > 3.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]