gnome-commander r1481 - in trunk: . src/tags
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1481 - in trunk: . src/tags
- Date: Tue, 8 Jan 2008 21:51:10 +0000 (GMT)
Author: epiotr
Date: Tue Jan 8 21:51:10 2008
New Revision: 1481
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1481&view=rev
Log:
Fix for memory leak in tag handling
Modified:
trunk/ChangeLog
trunk/src/tags/gnome-cmd-tags-doc.cc
trunk/src/tags/gnome-cmd-tags-exiv2.cc
Modified: trunk/src/tags/gnome-cmd-tags-doc.cc
==============================================================================
--- trunk/src/tags/gnome-cmd-tags-doc.cc (original)
+++ trunk/src/tags/gnome-cmd-tags-doc.cc Tue Jan 8 21:51:10 2008
@@ -469,7 +469,7 @@
if (!gnome_cmd_file_is_local(finfo)) return;
GError *err = NULL;
- const gchar *fname = gnome_cmd_file_get_real_path(finfo);
+ gchar *fname = gnome_cmd_file_get_real_path(finfo);
DEBUG('t', "Loading doc metadata for '%s'\n", fname);
@@ -482,9 +482,12 @@
g_return_if_fail (err != NULL);
g_warning ("'%s' error: %s", fname, err->message);
g_error_free (err);
+ g_free (fname);
return;
}
+ g_free (fname);
+
GsfInfile *infile = NULL;
if ((infile = gsf_infile_msole_new (input, NULL)))
Modified: trunk/src/tags/gnome-cmd-tags-exiv2.cc
==============================================================================
--- trunk/src/tags/gnome-cmd-tags-exiv2.cc (original)
+++ trunk/src/tags/gnome-cmd-tags-exiv2.cc Tue Jan 8 21:51:10 2008
@@ -388,7 +388,7 @@
if (!gnome_cmd_file_is_local(finfo)) return;
- const gchar *fname = gnome_cmd_file_get_real_path(finfo);
+ gchar *fname = gnome_cmd_file_get_real_path(finfo);
DEBUG('t', "Loading image metadata for '%s'\n", fname);
@@ -411,6 +411,8 @@
gint width, height;
GdkPixbufFormat *fmt = gdk_pixbuf_get_file_info (fname, &width, &height);
+ g_free (fname);
+
if (!fmt)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]