platform_bionic/libc/dns
Luke Huang 75830fb836 Initialize _nres only once
Currently, the initialization of _nres is not thread-saferes_mkquery is not thread-safe,
which might cause memory double free problem if caller ran under multithread.

To fix it, only initialize _nres once.
Also remove the redundant code.

Test: atest DnsResolverTest
Bug: 166235340
Change-Id: I9caa6eab37cb530fc60dae9bcca9650973a4536a
2021-04-07 02:05:50 +08:00
..
include Replace android_open_proxy with dns_open_proxy 2018-11-19 18:00:37 +08:00
nameser Test for ns_parserr() and got a heap-buffer-overflow 2019-08-29 22:18:37 +08:00
net Fewer copies of ALIGN()/ALIGNBYTES. 2021-01-11 11:51:29 -08:00
resolv Initialize _nres only once 2021-04-07 02:05:50 +08:00