Hi,
Maybe we want to add "free_parsestate(pstate);" after the "EndCopyFrom()" as well?
--Regards,ChangAo Chen