Don't leak an ASN1_OCTET_STRING on error in rsa_cms_encrypt
authorMatt Caswell <matt@openssl.org>
Wed, 27 Apr 2016 13:13:59 +0000 (14:13 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 28 Apr 2016 12:13:09 +0000 (13:13 +0100)
commit5e8129f278f5358243b4a8b3651e795d6a32696d
tree537f2ebba6c3965b8de4ecb42a687137585d479c
parentd54ac5c4bfcb75967960492de31a83fbc7c46673
Don't leak an ASN1_OCTET_STRING on error in rsa_cms_encrypt

The rsa_cms_encrypt() function allocates an ASN1_OCTET_STRING but can
then fail to free it in an error condition.

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/rsa/rsa_ameth.c