On Thu, 18 Dec 2008, Gregor Jasny 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 large
enough to hold the full list? The other solution is of course to make a more
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
well...
-- / daniel.haxx.se