> Explain to me how that won't loop forever if given a non-NULL dst?

Oops, forgot the dst = next in the loop :-)

> Next, this dst_bundle_free() thing is totally not needed as far as I can
> tell. When dst_free() is made, the top-level of the bundle's dst gets added
> to the garbage collection list, the garbage collection properly walks the
> children to process the whole bundle.

The garbage collector (called via __dst_free) takes dst_garbage_list and
goes through the dst->next pointer. But dst_destroy() seems to destroy stuff
on the dst->child list (I missed the part that the first dst has a refcnt of
zero and all others on child have refcnt of 1). So this is not needed.

> Please redo this patch and please test it this time :)


Are the other "bugs" correct :-) Or should I send separate patches this time ?

thanks,

- KK