diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp index b74fd59712..3ac0deede5 100644 --- a/security/keymint/support/remote_prov_utils.cpp +++ b/security/keymint/support/remote_prov_utils.cpp @@ -824,7 +824,7 @@ ErrMsgOr validateCertChain(const cppbor::Array& chain) { } if (i == chain.size() - 1) { auto key = getRawPublicKey(pubKey); - if (!key) key.moveMessage(); + if (!key) return key.moveMessage(); rawPubKey = key.moveValue(); } }