mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
libcrypto: Fix memory leak in evp_final()
Fixes T116
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit a280747462)
This commit is contained in:
@@ -165,6 +165,7 @@ void evp_update(EVPCTX ctx, const void *data, unsigned long len)
|
|||||||
void evp_final(EVPCTX ctx, unsigned char *md, unsigned int *mdlen)
|
void evp_final(EVPCTX ctx, unsigned char *md, unsigned int *mdlen)
|
||||||
{
|
{
|
||||||
EVP_DigestFinal(ctx, md, mdlen);
|
EVP_DigestFinal(ctx, md, mdlen);
|
||||||
|
EVP_MD_CTX_free(ctx);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user