[git commit] resolv: fix res_close not to hang with ipv6

Carmelo Amoroso carmelo73 at gmail.com
Wed Apr 13 12:44:27 UTC 2011


On 13/04/11 10:26, Bernhard Reutner-Fischer wrote:
> 
> commit: http://git.uclibc.org/uClibc/commit/?id=c277cc3c99a2499183fed84cdeb25c45a06f141d
> branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
> 
> Timo Teräs writes:
> The memory release loop is missing an obvious counter increment.
> 
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
> ---
>  libc/inet/resolv.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
> index 47bab75..05a1335 100644
> --- a/libc/inet/resolv.c
> +++ b/libc/inet/resolv.c
> @@ -3008,7 +3008,7 @@ void res_close(void)
>  		char *p1 = (char*) &(_res.nsaddr_list[0]);
>  		int m = 0;
>  		/* free nsaddrs[m] if they do not point to nsaddr_list[x] */
> -		while (m < ARRAY_SIZE(_res._u._ext.nsaddrs)) {
> +		while (m++ < ARRAY_SIZE(_res._u._ext.nsaddrs)) {
>  			char *p2 = (char*)(_res._u._ext.nsaddrs[m]);
>  			if (p2 < p1 || (p2 - p1) > sizeof(_res.nsaddr_list))
>  				free(p2);


Just noted that the git commit subject does not specifies he head (master,prelink, future etc) as before.
It was a nice feature.

Carmelo



More information about the uClibc-cvs mailing list