cxl: Fix leaking pid refs in some error paths