Skip to content
Commit 0755a7f0 authored by Robert Lubos's avatar Robert Lubos Committed by Maureen Helm
Browse files

net: sockets: getaddrinfo: Fix possible crash when callback is delayed



In case system workqueue processing is delayed for any reason, and
resolver callback is executed after getaddrinfo() call already timed
out, the system would crash as the callback makes use of the user data
allocated on the stack within getaddrinfo() function.

Prevent that, by cancelling the DNS request explicitly from the
getaddrinfo() context, therefore preventing the resolver callback
from being executed after the getaddrinfo() call ends.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 5cf70e48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment