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 |
||
---|---|---|
.. | ||
h_errno.c | ||
herror.c | ||
Makefile.inc | ||
mtctxres.c | ||
res_comp.c | ||
res_data.c | ||
res_debug.c | ||
res_debug.h | ||
res_findzonecut.c | ||
res_init.c | ||
res_mkquery.c | ||
res_mkupdate.c | ||
res_private.h | ||
res_query.c | ||
res_send.c | ||
res_state.c | ||
res_update.c | ||
Symbol.map |