[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Various fixes for resolve_host, from src/c/api/libspeechd.c.
From: |
Christopher Brannon |
Subject: |
[PATCH] Various fixes for resolve_host, from src/c/api/libspeechd.c. |
Date: |
Wed, 08 Sep 2010 16:29:03 -0500 |
Andrei Kholodnyi <andrei.kholodnyi at gmail.com> writes:
> Hi Chris,
> I think there is an error here. let's say
> resolved_ip = inet_ntop returns NULL.
Hi Andrei,
Good catch. If inet_ntop returns NULL, then resolve_host needs to
return NULL, and the buffer should be freed. I wrote that patch while
busy with other things yesterday. I'll resend.
> in it you just return resolve_buffer.
>
> beside that you will never reach
> freeaddrinfo(addr_result);
Exactly. The statement
return ip = resolve_buffer;
should be replaced with an assignment.
Thanks,
-- Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL:
<http://lists.freebsoft.org/pipermail/speechd/attachments/20100908/e70080d2/attachment.pgp>