diff options
author | Sverker Eriksson <[email protected]> | 2015-12-11 16:28:23 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-12-11 16:39:26 +0100 |
commit | d20ffad0455c6b9abf982b16d370e769bd9a8f69 (patch) | |
tree | 13492ac55fda361872579385d4fc3cca2958aafb /lib | |
parent | 91d628d92e49c693e79aee2cafc0032fb84e50a5 (diff) | |
download | otp-d20ffad0455c6b9abf982b16d370e769bd9a8f69.tar.gz otp-d20ffad0455c6b9abf982b16d370e769bd9a8f69.tar.bz2 otp-d20ffad0455c6b9abf982b16d370e769bd9a8f69.zip |
crypto: Fix potential memory leak in error case for block cipher
Diffstat (limited to 'lib')
-rw-r--r-- | lib/crypto/c_src/crypto.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 9155c928fe..6a41385296 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1359,6 +1359,7 @@ static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM key.data, ivec_size ? ivec.data : NULL, -1) || !EVP_CIPHER_CTX_set_padding(&ctx, 0)) { + EVP_CIPHER_CTX_cleanup(&ctx); return enif_raise_exception(env, atom_notsup); } |