[glib-openssl] connection: do not leak error



commit 60f84fd2d6166514def097c75c271e2a2f4a9ecb
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Tue Oct 17 11:55:38 2017 +0200

    connection: do not leak error

 tls/openssl/gtlsconnection-openssl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index 29494c2..ac1a67c 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -163,6 +163,7 @@ end_openssl_io (GTlsConnectionOpenssl  *openssl,
 
   if (reason == SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE)
     {
+      g_clear_error (&my_error);
       g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED,
                            _("TLS connection peer did not send a certificate"));
       return status;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]