gedit-plugins r404 - in trunk: . plugins/drawspaces



Author: pborelli
Date: Sun Nov 30 14:04:41 2008
New Revision: 404
URL: http://svn.gnome.org/viewvc/gedit-plugins?rev=404&view=rev

Log:
2008-11-30  Paolo Borelli  <pborelli katamail com>

	* plugins/drawspaces/gedit-drawspaces-plugin.c:	plug leak.



Modified:
   trunk/ChangeLog
   trunk/plugins/drawspaces/gedit-drawspaces-plugin.c

Modified: trunk/plugins/drawspaces/gedit-drawspaces-plugin.c
==============================================================================
--- trunk/plugins/drawspaces/gedit-drawspaces-plugin.c	(original)
+++ trunk/plugins/drawspaces/gedit-drawspaces-plugin.c	Sun Nov 30 14:04:41 2008
@@ -247,14 +247,20 @@
 			      gboolean def)
 {
 	GConfValue *value;
+	gboolean ret;
 
 	value = gconf_client_get (plugin->priv->gconf_client,
 				  key, NULL);
-				  
-	if (value == NULL || value->type != GCONF_VALUE_BOOL)
-		return def;
+
+	if (value != NULL && value->type == GCONF_VALUE_BOOL)
+		ret = gconf_value_get_bool (value);
 	else
-		return gconf_value_get_bool (value);
+		ret = def;
+
+	if (value != NULL)
+		gconf_value_free (value);
+
+	return ret;
 }
 
 static void



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