Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
evdns: fix race condition in evdns_getaddrinfo()
evdns_getaddrinfo() starts two parallel requests for A and AAAA record. But if request is created from thread different from dns_base's, request of A record is started immediately and may result in calling free_getaddrinfo_request() from evdns_getaddrinfo_gotresolve() because `other_req' doesn't exist yet. After that, request of AAAA record starts and finishes, and evdns_getaddrinfo_gotresolve() is called again for structure that is already freed. This commits adds locking into evdns_getaddrinfo() function.
- Loading branch information