freebsd-dev/lib/libc/resolv
Don Lewis d7f12eacbb Don't leak addrinfo if ai->ai_addrlen <= minsiz test fails.
If the ai->ai_addrlen <= minsiz test fails, then freeaddrinfo()
does not get called to free the memory just allocated by getaddrinfo().
Fix by moving ai->ai_addrlen <= minsiz to a separate nested if
block, and keep freeaddrinfo() in the outer block so that freeaddrinfo()
will be called whenever getaddrinfo() succeeds.

Reported by:	Coverity
CID:		1273652
Reviewed by:	ume
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6756
2016-06-08 09:40:06 +00:00
..
h_errno.c
herror.c
Makefile.inc
mtctxres.c
res_comp.c libc: spelling fixes. 2016-04-30 01:24:24 +00:00
res_data.c
res_debug.c
res_debug.h
res_findzonecut.c libc: spelling fixes. 2016-04-30 01:24:24 +00:00
res_init.c Don't leak addrinfo if ai->ai_addrlen <= minsiz test fails. 2016-06-08 09:40:06 +00:00
res_mkquery.c
res_mkupdate.c
res_private.h
res_query.c Since rdata is only used as an argument to the immediately following 2016-05-16 01:38:24 +00:00
res_send.c
res_state.c
res_update.c
Symbol.map