This month's Index
Re: IPv6 servers redux
Daniel Stenberg wrote:
> Hey, here's my update of your patch from current CVS HEAD.
> It struck me that the API for ares_get_servers() is not really solid. How
> would a user free the list of servers again? We can't assume that free() is
> fine on memory returned from c-ares.
> Would it perhaps make sense to fill in a given buffer instead of doing a
> malloc, and then do a 'too small buffer' return code if the buffer isn't
> enough to hold the full list? The other solution is of course to make a
> generic ares_free() function that would free the given resource. It
> could then
> be made somewhat genericly so that it can be used for future returned
> data as
I'd vote for a generic ares_free(). I'll prepare a patch and test again
Received on 2009-01-19