Don't leak memory on error in cms_RecipientInfo_pwri_crypt
authorMatt Caswell <matt@openssl.org>
Wed, 27 Apr 2016 12:18:38 +0000 (13:18 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 28 Apr 2016 12:13:09 +0000 (13:13 +0100)
commit29f4c357f045562d7eb7837ae890efc1bf4809a2
treeb01c9358ede1fb64b58d6b8ec29c0c06d22fc69b
parentd71eb667c403d9781ef919794e29a79eb930ab88
Don't leak memory on error in cms_RecipientInfo_pwri_crypt

The cms_RecipientInfo_pwri_crypt() allocated an EVP_CIPHER_CTX but then
failed to free it in some error paths. By allocating it a bit later that
can be avoided.

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