summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2008-09-19 14:34:22 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-09-19 14:34:22 +0000
commit661fbdfa26af5f5a392085b35a1a43294f1ea975 (patch)
tree72f5fcd0a45f9915f923d58247f9af64c94040c2 /gdk-pixbuf
parent6b812e7770c3e9ad33ef3cb36cd57a04e534b675 (diff)
downloadgtk+-661fbdfa26af5f5a392085b35a1a43294f1ea975.tar.gz
Plug a small memory leak
svn path=/trunk/; revision=21451
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog5
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 619ddddedf..27f0a94f1a 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-19 Matthias Clasen <mclasen@redhat.com>
+
+ * gdk-pixbuf-io.c: Don't call fill_info if we've already filled
+ the info from the module file, fixes a small memory leak.
+
2008-09-18 Dominic Lachowicz <domlachowicz@gmail.com>
* io-gdip-utils.c: Fix 2 cases where we leaked a GpImage (#552545)
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index d6ddce76a2..c24d456066 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -678,9 +678,10 @@ gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
if (fill_vtable) {
image_module->module = (void *) 1;
(* fill_vtable) (image_module);
- image_module->info = g_new0 (GdkPixbufFormat, 1);
- (* fill_info) (image_module->info);
-
+ if (image_module->info == NULL) {
+ image_module->info = g_new0 (GdkPixbufFormat, 1);
+ (* fill_info) (image_module->info);
+ }
return TRUE;
}
else