Leak in gnome-vfs-daemon-method.c
- From: Kjartan Maraas <kmaraas broadpark no>
- To: "gnome-vfs-list gnome org" <gnome-vfs-list gnome org>
- Subject: Leak in gnome-vfs-daemon-method.c
- Date: Mon, 11 Sep 2006 12:31:38 +0200
Valgrind found this leak when running the panel...
Cheers
Kjartan
Index: libgnomevfs/gnome-vfs-daemon-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-daemon-method.c,v
retrieving revision 1.9
diff -u -p -r1.9 gnome-vfs-daemon-method.c
--- libgnomevfs/gnome-vfs-daemon-method.c 13 Jul 2006 15:33:13 -0000 1.9
+++ libgnomevfs/gnome-vfs-daemon-method.c 11 Sep 2006 09:16:26 -0000
@@ -234,8 +234,11 @@ gnome_vfs_daemon_message_iter_get_file_i
dbus_message_iter_next (&struct_iter);
str = utils_get_string_or_null (&struct_iter, FALSE);
- info->name = gnome_vfs_unescape_string (str, NULL);
-
+ if (str) {
+ info->name = gnome_vfs_unescape_string (str, NULL);
+ g_free (str);
+ }
+
dbus_message_iter_next (&struct_iter);
dbus_message_iter_get_basic (&struct_iter, &i);
info->type = i;
@@ -292,12 +295,14 @@ gnome_vfs_daemon_message_iter_get_file_i
str = utils_get_string_or_null (&struct_iter, TRUE);
if (str) {
info->symlink_name = gnome_vfs_unescape_string (str, NULL);
+ g_free (str);
}
dbus_message_iter_next (&struct_iter);
str = utils_get_string_or_null (&struct_iter, TRUE);
if (str) {
info->mime_type = g_strdup (str);
+ g_free (str);
}
return info;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]