Merge "cdr: Missing NULL check and unlock."