The problem is that addchild(..., centry) may free centry and use samename instead, and then the caller site does: last = centry; pointing to free memory. The correct fix I think is to have addchild return the proper NODE to be assigned as last, instead of leaking memory and using the old node.
Attachment:
spec.c.diff
Description: Binary data
christos
Attachment:
signature.asc
Description: Message signed with OpenPGP