libc/getaddrinfo: Fix bugs in two early error paths of _dns_getaddrinfo().
authorSascha Wildner <saw@online.de>
Fri, 21 Feb 2014 16:30:39 +0000 (17:30 +0100)
committerSascha Wildner <saw@online.de>
Fri, 21 Feb 2014 16:31:25 +0000 (17:31 +0100)
commit49dfb17ed6246b65614267a0f300bf6c7be5abdf
treeb1b6e25471d52b54784c9f54a7150b35be1e13e5
parent34c2e9533fcb34bd25301135b46d1a81d8839b75
libc/getaddrinfo: Fix bugs in two early error paths of _dns_getaddrinfo().

We cannot use RES_SET_H_ERRNO() here upon malloc() failure because res is
not yet initialized at this point and RES_SET_H_ERRNO() (aka __h_errno())
would reference it.
lib/libc/net/getaddrinfo.c