paride/pcd: Fix potential NULL pointer dereference and mem leak