Coverity flagged a location where we didn't check this return code, fix
it up.
Fixes https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=
1696759
Reviewed-by: Milan Broz <mbroz@openssl.org>
Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jul 23 08:24:22 2026
(Merged from https://github.com/openssl/openssl/pull/31992)
* lives beyond the freeing of that tmp_store
*/
#ifndef OPENSSL_NO_CACHED_FETCH
- OSSL_DECODER_up_ref((OSSL_DECODER *)method);
+ if (!OSSL_DECODER_up_ref((OSSL_DECODER *)method)) {
+ ossl_decoder_free(method);
+ method = NULL;
+ }
#endif
}
}