On Tue, 27 Oct 2009, Jakub Hrozek wrote:
> I tested that apart from simple records and multiple records per host, it
> also handles multiple substrings in the TXT record (used to make the whole
> string>255 bytes, configured as 'host IN TXT ( "Foo" "Bar" )' in Bind).
>
> Comments or reviews are mostly welcome!
I gave it a quick glance just now and I spotted two things:
1) 'struct txt_reply' is a global struct and should thus be with ares_ prefix
like ares_txt_reply or similar.
2) in the loop I spotted a malloc() that does break on a NULL return, but
there's no free()ing done on previous successful malloc()s and thus this
function risks leaking memory. (I realize it is an edge case, but still...)
-- / daniel.haxx.seReceived on 2009-10-27