Fix another decoder mem leak on an error path
authorMatt Caswell <matt@openssl.org>
Thu, 26 May 2022 10:30:09 +0000 (11:30 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 2 Jun 2022 09:31:12 +0000 (10:31 +0100)
commitda3193976380b8bd697a472025ff9f384cbca7af
treec61456fb724567cfa69b89e4ef2699bbd6f3433d
parent9ec9b968f93e4a8e7c90eb1e717f0d7cd4ab722d
Fix another decoder mem leak on an error path

If pushing the decoder onto a stack fails then we should free the ref
we just created.

Found due to the error report here:
https://github.com/openssl/openssl/pull/18355#issuecomment-1138205688

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18411)
crypto/encode_decode/decoder_lib.c