lavf/img2dec: Fix memory leak