[maemo-commits] [maemo-commits] r16015 - projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugins
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Sep 4 19:28:02 EEST 2008
- Previous message: [maemo-commits] r16014 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Next message: [maemo-commits] r16016 - projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugins
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: pvanhoof Date: 2008-09-04 19:28:01 +0300 (Thu, 04 Sep 2008) New Revision: 16015 Modified: projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugins/default.c Log: Memory leak when unloading the plugin Modified: projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugins/default.c =================================================================== --- projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugins/default.c 2008-09-04 16:24:59 UTC (rev 16014) +++ projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugins/default.c 2008-09-04 16:28:01 UTC (rev 16015) @@ -42,11 +42,11 @@ #include "default.h" #include "hildon-thumbnail-plugin.h" +static gchar **supported = NULL; const gchar** hildon_thumbnail_plugin_supported (void) { - static gchar **supported = NULL; if (!supported) { GSList *formats = gdk_pixbuf_get_formats (), *copy; @@ -64,7 +64,7 @@ } supported = (gchar **) g_malloc0 (sizeof (gchar *) * (types_support->len + 1)); for (i = 0 ; i < types_support->len; i++) - supported[i] = g_ptr_array_index (types_support, i); + supported[i] = g_strdup (g_ptr_array_index (types_support, i)); g_slist_free (formats); } @@ -73,8 +73,6 @@ #define HILDON_THUMBNAIL_OPTION_PREFIX "tEXt::Thumb::" #define HILDON_THUMBNAIL_APPLICATION "hildon-thumbnail" -#define DEFAULT_MAX_PROCESSES 1 -#define THUMBS_GCONF_DIR "/apps/osso/osso/thumbnailers" #define URI_OPTION HILDON_THUMBNAIL_OPTION_PREFIX "URI" #define MTIME_OPTION HILDON_THUMBNAIL_OPTION_PREFIX "MTime" #define SOFTWARE_OPTION "tEXt::Software" @@ -217,6 +215,8 @@ void hildon_thumbnail_plugin_stop (void) { + if (supported) + g_strfreev (supported); }
- Previous message: [maemo-commits] r16014 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Next message: [maemo-commits] r16016 - projects/haf/branches/hildon-thumbnail/daemonize/daemon/plugins
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]