[glib-networking/tls-database] gnutls: Error finalizing a partially initialized GTlsFileDatabaseGnutls



commit 69e66d0f9bb1cf9220d67a63759853a3a499edcb
Author: Stef Walter <stefw collabora co uk>
Date:   Mon Jan 17 21:41:51 2011 -0800

    gnutls: Error finalizing a partially initialized GTlsFileDatabaseGnutls
    
    Don't assume that priv->anchors has been initialized.

 tls/gnutls/gtlsfiledatabase-gnutls.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tls/gnutls/gtlsfiledatabase-gnutls.c b/tls/gnutls/gtlsfiledatabase-gnutls.c
index b2250a8..b43062d 100644
--- a/tls/gnutls/gtlsfiledatabase-gnutls.c
+++ b/tls/gnutls/gtlsfiledatabase-gnutls.c
@@ -155,7 +155,8 @@ g_tls_file_database_gnutls_finalize (GObject *object)
 {
   GTlsFileDatabaseGnutls *self = G_TLS_FILE_DATABASE_GNUTLS (object);
 
-  g_hash_table_destroy (self->priv->anchors);
+  if (self->priv->anchors)
+    g_hash_table_destroy (self->priv->anchors);
   self->priv->anchors = NULL;
 
   g_free (self->priv->anchor_filename);



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