]> git.0d.be Git - empathy.git/commitdiff
Use tp_clear_pointer() where possible
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 18 Aug 2010 14:43:17 +0000 (16:43 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 18 Aug 2010 17:18:56 +0000 (19:18 +0200)
libempathy/empathy-tls-verifier.c

index cd76a891728fb0f1c1f2609f5b5ab905e604825d..c2169f0fdb4500ded40dd55b275ecbd4b6f7355b 100644 (file)
@@ -619,14 +619,10 @@ empathy_tls_verifier_finalize (GObject *object)
 
   DEBUG ("%p", object);
 
-  if (priv->trusted_ca_list != NULL)
-    g_ptr_array_unref (priv->trusted_ca_list);
-
-  if (priv->cert_chain != NULL)
-    g_ptr_array_unref (priv->cert_chain);
-
-  g_free (priv->hostname);
+  tp_clear_pointer (&priv->trusted_ca_list, g_ptr_array_unref);
+  tp_clear_pointer (&priv->cert_chain, g_ptr_array_unref);
   tp_clear_boxed (G_TYPE_HASH_TABLE, &priv->details);
+  g_free (priv->hostname);
 
   G_OBJECT_CLASS (empathy_tls_verifier_parent_class)->finalize (object);
 }