diff options
| author | Neil Horman <[email protected]> | 2026-07-17 19:04:29 +0200 |
|---|---|---|
| committer | Norbert Pocs <[email protected]> | 2026-07-23 10:24:01 +0200 |
| commit | eac8ed4825213a80644bb5ea15234a59daa57352 (patch) | |
| tree | 4590827aeadd9bb13dcb3eb7e8a3ac90b358dbdb | |
| parent | errors: fix stale string overrides in openssl.txt for renamed SSL error codes (diff) | |
| download | openssl-eac8ed4825213a80644bb5ea15234a59daa57352.tar.gz openssl-eac8ed4825213a80644bb5ea15234a59daa57352.zip | |
Add return check to OSSL_DECODER_up_ref
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 <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
Reviewed-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jul 23 08:24:22 2026
(Merged from https://github.com/openssl/openssl/pull/31992)
| -rw-r--r-- | crypto/encode_decode/decoder_meth.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/encode_decode/decoder_meth.c b/crypto/encode_decode/decoder_meth.c index 03118f5843b..632d20c996a 100644 --- a/crypto/encode_decode/decoder_meth.c +++ b/crypto/encode_decode/decoder_meth.c @@ -415,7 +415,10 @@ inner_ossl_decoder_fetch(struct decoder_data_st *methdata, * 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 } } |
