nwrap: in nwrap_getaddrinfo, only call libc_getaddrinfo if we need it.
authorMichael Adam <obnox@samba.org>
Fri, 6 Nov 2015 10:43:04 +0000 (11:43 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 11:25:29 +0000 (12:25 +0100)
commit559ed74a5aae5254b8b702a039b360a800af6d5c
tree64402b965573c285eef5e9406a392b29c8abe6dc
parent9927e499f2a4f0f19ffd609eacc6d799da9861cd
nwrap: in nwrap_getaddrinfo, only call libc_getaddrinfo if we need it.

Instead of calling libc_getaddrinfo on spec and throwing
away the result when we are certain that we don't need it,
call libc only if we really need it.

This fixes another memleak for the libc result.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/nss_wrapper/nss_wrapper.c