Fix error handling in X509_chain_up_ref

No match.