On 08/23/2010 11:55 PM, Tommie Gannert wrote:
> Ning Dong wrote:
>> Hi,
>>
>> In function ares_malloc_data of ares_data.c, "break" is misssed after line 148.
>>
> FWIW, I agree.
>> That cause ares_get_servers always returning error.
>>
> This is the only place I can find a call to
> (ares_malloc_data(ARES_DATATYPE_ADDR_NODE)).
>
How does this look for a fix?
diff --git a/ares_data.c b/ares_data.c
index 6b6fae8..a2477be 100644
--- a/ares_data.c
+++ b/ares_data.c
@@ -145,7 +145,8 @@ void *ares_malloc_data(ares_datatype type)
ptr->data.addr_node.next = NULL;
ptr->data.addr_node.family = 0;
memset(&ptr->data.addr_node.addrV6, 0,
- sizeof(ptr->data.addr_node.addrV6));
+ sizeof(ptr->data.addr_node.addrV6));
+ break;
default:
free(ptr);
Thanks,
Ben
-- Ben Greear <greearb_at_candelatech.com> Candela Technologies Inc http://www.candelatech.comReceived on 2010-08-24