aboutsummaryrefslogtreecommitdiff
path: root/src/libcrypto.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-10-27 22:15:56 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-10-27 22:15:56 +0200
commita2807474621e51b386ea26ce2a01d2b1aa295c7b (patch)
treeb903b44b24d5817ae725de09f7a5777e3e602a88 /src/libcrypto.c
parentbce8d567053232debd6ec490af5a7d27e1160f39 (diff)
downloadlibssh-a2807474621e51b386ea26ce2a01d2b1aa295c7b.tar.gz
libssh-a2807474621e51b386ea26ce2a01d2b1aa295c7b.tar.xz
libssh-a2807474621e51b386ea26ce2a01d2b1aa295c7b.zip
libcrypto: Fix memory leak in evp_final()
Fixes T116 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/libcrypto.c')
-rw-r--r--src/libcrypto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcrypto.c b/src/libcrypto.c
index 35b73b9f..fd5c8ce9 100644
--- a/src/libcrypto.c
+++ b/src/libcrypto.c
@@ -196,6 +196,7 @@ void evp_update(EVPCTX ctx, const void *data, unsigned long len)
void evp_final(EVPCTX ctx, unsigned char *md, unsigned int *mdlen)
{
EVP_DigestFinal(ctx, md, mdlen);
+ EVP_MD_CTX_free(ctx);
}
#endif