freebsd-skq/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 libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
Makefile.inc
mtctxres.c
res_comp.c libc: spelling fixes. 2016-04-30 01:24:24 +00:00
res_data.c libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
res_debug.c libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
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 libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
res_mkupdate.c libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
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 libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
res_state.c
res_update.c
Symbol.map