Hello,

I attached patch that fixes memory leak, described in #559

Cheers,
Ilya Shipitcin
From a52fad9b32959afc78b4e3086b4d3e17458d19b1 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <chipits...@gmail.com>
Date: Sat, 21 Mar 2020 19:21:10 +0500
Subject: [PATCH] BUG/MINOR: src/ssl_sock.c: free "find_chain" upon exit

non-recurring memory leak was detected in issue #559
---
 src/ssl_sock.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 9b44e9d0b..efd464255 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -3702,6 +3702,10 @@ static int ssl_sock_put_ckch_into_ctx(const char *path, const struct cert_key_an
 #endif
 
  end:
+
+        if (find_chain)
+                sk_X509_pop_free(find_chain, X509_free);
+
 	return errcode;
 }
 
-- 
2.25.1

Reply via email to