freebsd-src/lib/libc/resolv
Don Lewis 14b15f6ce4 MFC r301592
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
Differential Revision:	https://reviews.freebsd.org/D6756
2016-06-15 06:40:30 +00:00
..
h_errno.c Nuke some compatibility crufts of resolver for 6.X and earlier. 2006-05-21 11:29:26 +00:00
herror.c MFC r269867: 2014-08-30 10:16:25 +00:00
Makefile.inc MFC r269867: 2014-08-30 10:16:25 +00:00
mtctxres.c Merge BIND9 9.3.3 into main chunk. 2006-12-15 20:59:55 +00:00
res_comp.c MFC r284229: Add support for '_' occurring at the beginning or 2015-06-18 16:39:05 +00:00
res_data.c MFC r289837 2015-12-19 02:35:32 +00:00
res_debug.c MFC r269867: 2014-08-30 10:16:25 +00:00
res_debug.h Vendor import of BIND 9.4.1 2007-06-03 17:02:29 +00:00
res_findzonecut.c MFC r269867: 2014-08-30 10:16:25 +00:00
res_init.c MFC r301592 2016-06-15 06:40:30 +00:00
res_mkquery.c MFC r292250: 2015-12-18 06:58:44 +00:00
res_mkupdate.c MFC r292250: 2015-12-18 06:58:44 +00:00
res_private.h MFC r289315, r292216 2015-12-19 02:41:31 +00:00
res_query.c MFC r299879, r299880 2016-05-20 07:18:33 +00:00
res_send.c MFC r292250: 2015-12-18 06:58:44 +00:00
res_state.c MFC r289315, r292216 2015-12-19 02:41:31 +00:00
res_update.c MFC r269867: 2014-08-30 10:16:25 +00:00
Symbol.map MFC r269867: 2014-08-30 10:16:25 +00:00