summaryrefslogtreecommitdiff
path: root/gtk/gtkiconcache.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-03-31 05:17:56 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-03-31 05:17:56 +0000
commit082d4176d58a5cdb0468eeef9ca0227c9fcb5547 (patch)
treeaafdff146a18e8cb2802debd4d1af23cca3cf046 /gtk/gtkiconcache.c
parent1d4c765db08ffc8f022f6512253f494b4404219c (diff)
downloadgtk+-082d4176d58a5cdb0468eeef9ca0227c9fcb5547.tar.gz
Don't leak the keyfile parser in the error case.
2006-03-31 Matthias Clasen <mclasen@redhat.com> * gtk/gtkicontheme.c (load_icon_data): Don't leak the keyfile parser in the error case. * gtk/gtkicontheme.c (load_icon_data, free_unthemed_icon) (icon_data_free, load_themes): * gtk/gtkiconcache.c (_gtk_icon_cache_get_icon_data): Use the slice allocator for GtkIconData and UnthemedIcon structs.
Diffstat (limited to 'gtk/gtkiconcache.c')
-rw-r--r--gtk/gtkiconcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c
index 23fe31d6da..55559aac12 100644
--- a/gtk/gtkiconcache.c
+++ b/gtk/gtkiconcache.c
@@ -489,7 +489,7 @@ _gtk_icon_cache_get_icon_data (GtkIconCache *cache,
if (!meta_data_offset)
return NULL;
- data = g_new0 (GtkIconData, 1);
+ data = g_slice_new0 (GtkIconData);
offset = GET_UINT32 (cache->buffer, meta_data_offset);
if (offset)