[glib-networking] gnutls: free op_mutex in finalize()



commit 73126cc4cf889634fff7ccf708ff17d1ea5e9da2
Author: Dan Winship <danw gnome org>
Date:   Wed Feb 13 11:13:43 2013 -0500

    gnutls: free op_mutex in finalize()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693718

 tls/gnutls/gtlsconnection-gnutls.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index aac43f8..7fc1695 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -189,6 +189,7 @@ g_tls_connection_gnutls_init (GTlsConnectionGnutls *gnutls)
 
   gnutls->priv->waiting_for_op = g_cancellable_new ();
   g_cancellable_cancel (gnutls->priv->waiting_for_op);
+  g_mutex_init (&gnutls->priv->op_mutex);
 }
 
 /* First field is "ssl3 only", second is "allow unsafe rehandshaking" */
@@ -308,6 +309,7 @@ g_tls_connection_gnutls_finalize (GObject *object)
   g_clear_error (&gnutls->priv->write_error);
 
   g_clear_object (&gnutls->priv->waiting_for_op);
+  g_mutex_clear (&gnutls->priv->op_mutex);
 
   G_OBJECT_CLASS (g_tls_connection_gnutls_parent_class)->finalize (object);
 }


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