Input: ims-pcu - fix a memory leak on error