aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-03-11 19:54:45 +0100
committerHans Nilsson <[email protected]>2019-03-19 12:45:55 +0100
commit00dcdf6c9aec2a78f15bf673f56a1c044103b23e (patch)
tree9a18b1cf62a73204a076693d27a950d724caec2b /lib
parent7bcd1c7f70c70cb09e053510087b27728793caa6 (diff)
downloadotp-00dcdf6c9aec2a78f15bf673f56a1c044103b23e.tar.gz
otp-00dcdf6c9aec2a78f15bf673f56a1c044103b23e.tar.bz2
otp-00dcdf6c9aec2a78f15bf673f56a1c044103b23e.zip
crypto: Fix leak for eddsa detected by Valgrind
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/c_src/pkey.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/crypto/c_src/pkey.c b/lib/crypto/c_src/pkey.c
index 393358d173..638bb588fa 100644
--- a/lib/crypto/c_src/pkey.c
+++ b/lib/crypto/c_src/pkey.c
@@ -719,6 +719,11 @@ enif_get_atom(env,argv[1],buf,1024,ERL_NIF_LATIN1); printf("hash=%s ",buf);
if (pkey)
EVP_PKEY_free(pkey);
+#ifdef HAVE_EDDSA
+ if (mdctx)
+ EVP_MD_CTX_free(mdctx);
+#endif
+
return ret;
}