ducatividdec: fix buffer leaks on error paths