[gnutls-devel] [PATCH 2/9] Memory leak fix on certificate copy failure

Armin Burgmeier armin at arbur.net
Thu Sep 18 17:22:50 CEST 2014


Signed-off-by: Armin Burgmeier <armin at arbur.net>
---
 lib/x509/verify-high.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/x509/verify-high.c b/lib/x509/verify-high.c
index e7faccc..065920d 100644
--- a/lib/x509/verify-high.c
+++ b/lib/x509/verify-high.c
@@ -302,6 +302,7 @@ int ret;
 
 	ret = _gnutls_x509_crt_cpy(dst, src);
 	if (ret < 0) {
+		gnutls_x509_crt_deinit(dst);
 		gnutls_assert();
 		return NULL;
 	}
-- 
2.1.0




More information about the Gnutls-devel mailing list