[glib-networking/glib-2-68] gnutls: Fix potential leak



commit 1c969c5d58a0f305d4e04181d9db287f26c24adc
Author: Patrick Griffis <pgriffis igalia com>
Date:   Mon Aug 23 09:21:48 2021 -0500

    gnutls: Fix potential leak
    
    
    (cherry picked from commit f7b3250d3e3fce4ea02b00610d9f2148ade4a6ce)

 tls/gnutls/gtlscertificate-gnutls.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/tls/gnutls/gtlscertificate-gnutls.c b/tls/gnutls/gtlscertificate-gnutls.c
index 62d586a9..8fe58829 100644
--- a/tls/gnutls/gtlscertificate-gnutls.c
+++ b/tls/gnutls/gtlscertificate-gnutls.c
@@ -529,6 +529,7 @@ g_tls_certificate_gnutls_copy  (GTlsCertificateGnutls  *gnutls,
                                                  gnutls->private_key_pkcs11_uri ? 
gnutls->private_key_pkcs11_uri : gnutls->pkcs11_uri);
       if (status != GNUTLS_E_SUCCESS)
         {
+          gnutls_privkey_deinit (*pkey);
           *pkey = NULL;
           g_info ("Failed to copy PKCS #11 private key: %s", gnutls_strerror (status));
         }


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