wtvdec: fix memleak on error