You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
737 B

  1. From 9d5cf209df4c260546e1468cc15fbbbfba3097c6 Mon Sep 17 00:00:00 2001
  2. From: Andreas Schneider <asn@cryptomilk.org>
  3. Date: Sat, 27 Oct 2018 22:15:56 +0200
  4. Subject: [PATCH 8/8] libcrypto: Fix memory leak in evp_final()
  5. Fixes T116
  6. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
  7. (cherry picked from commit a2807474621e51b386ea26ce2a01d2b1aa295c7b)
  8. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
  9. ---
  10. src/libcrypto.c | 1 +
  11. 1 file changed, 1 insertion(+)
  12. --- a/src/libcrypto.c
  13. +++ b/src/libcrypto.c
  14. @@ -165,6 +165,7 @@ void evp_update(EVPCTX ctx, const void *
  15. void evp_final(EVPCTX ctx, unsigned char *md, unsigned int *mdlen)
  16. {
  17. EVP_DigestFinal(ctx, md, mdlen);
  18. + EVP_MD_CTX_free(ctx);
  19. }
  20. #endif