git: libc/getaddrinfo: Fix bugs in two early error paths of _dns_getaddrinfo().

Sascha Wildner swildner at crater.dragonflybsd.org
Fri Feb 21 08:32:27 PST 2014


commit 49dfb17ed6246b65614267a0f300bf6c7be5abdf
Author: Sascha Wildner <saw at online.de>
Date:   Fri Feb 21 17:30:39 2014 +0100

    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.

Summary of changes:
 lib/libc/net/getaddrinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/49dfb17ed6246b65614267a0f300bf6c7be5abdf


-- 
DragonFly BSD source repository


More information about the Commits mailing list