[core] avoid freeaddrinfo() on NULL ptr (fixes #2984)
commit851728c6a13ed38a2c333daf62f8d6e649e11004
authorGlenn Strauss <gstrauss@gluelogic.com>
Sat, 28 Sep 2019 23:16:18 +0000 (28 19:16 -0400)
committerGlenn Strauss <gstrauss@gluelogic.com>
Sun, 26 Jan 2020 05:14:28 +0000 (26 00:14 -0500)
treedd1c37d8bf4907f40d0d7c9ebb33ac36c6536d4b
parent5c3f439bcf6be89872011b3d94aaf82e8897894d
[core] avoid freeaddrinfo() on NULL ptr (fixes #2984)

getaddrinfo() should return non-empty result list (res)
or else should return EAI_NONAME or some other error

(musl C library does not check for NULL argument to freeaddrinfo())

x-ref:
  "Segmentation fault in mod_extforward with libmusl"
  https://redmine.lighttpd.net/issues/2984
src/sock_addr.c