Fix the error handling in CRYPTO_dup_ex_data.