gtk+ r21372 - branches/gtk-2-12/gdk-pixbuf
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21372 - branches/gtk-2-12/gdk-pixbuf
- Date: Fri, 12 Sep 2008 04:51:18 +0000 (UTC)
Author: matthiasc
Date: Fri Sep 12 04:51:18 2008
New Revision: 21372
URL: http://svn.gnome.org/viewvc/gtk+?rev=21372&view=rev
Log:
* gdk-pixbuf-io.c: Plug a small memory leak
Bug 517233 - Calling gdk_pixbuf_loader_close causes "GError set over
the top of a previous GError" warning
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't overwrite
errors. Reported by Andrey Tsyvarev
Modified:
branches/gtk-2-12/gdk-pixbuf/ChangeLog
branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-io.c
branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-loader.c
Modified: branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-io.c
==============================================================================
--- branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-io.c (original)
+++ branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-io.c Fri Sep 12 04:51:18 2008
@@ -367,6 +367,8 @@
if (file_formats == NULL)
g_warning ("Cannot open pixbuf loader module file '%s': %s",
filename, error->message);
+ g_string_free (tmp_buf, TRUE);
+ g_free (filename);
return;
}
Modified: branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-loader.c
==============================================================================
--- branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-loader.c (original)
+++ branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-loader.c Fri Sep 12 04:51:18 2008
@@ -726,8 +726,12 @@
* here, since we might not get an error in the
* gdk_pixbuf_get_file_info() case
*/
- if (tmp)
- g_propagate_error (error, tmp);
+ if (tmp) {
+ if (error && *error == NULL)
+ g_propagate_error (error, tmp);
+ else
+ g_error_free (tmp);
+ }
retval = FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]