[GNOME VFS] leak fixage ...

Michael Meeks <[email protected]>
Newsgroups gmane.comp.gnome.vfs
Organization Ximian.
Message-ID <[email protected]>
I just committed this, I hope that's ok,

	Regards,

		Michael.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v
retrieving revision 1.1297
diff -u -p -u -r1.1297 ChangeLog
--- ChangeLog	16 May 2002 00:11:59 -0000	1.1297
+++ ChangeLog	16 May 2002 15:05:01 -0000
@@ -1,3 +1,12 @@
+2002-05-16  Michael Meeks  <[email protected]>
+
+	* libgnomevfs/gnome-vfs-mime-handlers.c
+	(gnome_vfs_mime_edit_user_file_full): don't dup (leak)
+	key and value.
+
+	* modules/file-method.c (fam_callback): unref the
+	URI we create.
+
 2002-04-19  Mark McLoughlin  <[email protected]>
 
 	* modules/http-method.c: (construct_gl_http_proxy),
Index: TODO
===================================================================
RCS file: /cvs/gnome/gnome-vfs/TODO,v
retrieving revision 1.14
diff -u -p -u -r1.14 TODO
--- TODO	25 May 2001 09:18:10 -0000	1.14
+++ TODO	16 May 2002 15:05:02 -0000
@@ -113,6 +113,9 @@ everything easier to implement.
 
 * Make directory/xfer calls cancellable as well.
 
+* Specific issues
+	gnome_vfs_monitor_callback's info_uri should be const.
+
 Installation issues
 -------------------
 
Index: libgnomevfs/gnome-vfs-mime-handlers.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-mime-handlers.c,v
retrieving revision 1.96
diff -u -p -u -r1.96 gnome-vfs-mime-handlers.c
--- libgnomevfs/gnome-vfs-mime-handlers.c	20 Apr 2002 22:25:49 -0000	1.96
+++ libgnomevfs/gnome-vfs-mime-handlers.c	16 May 2002 15:05:02 -0000
@@ -881,7 +881,7 @@ gnome_vfs_mime_edit_user_file_full (cons
 		if (value == NULL) {
 			value = "";
 		}
-		gnome_vfs_mime_set_value (mime_type, g_strdup (key), g_strdup (value));
+		gnome_vfs_mime_set_value (mime_type, key, value);
 	}
 	gnome_vfs_mime_thaw ();
 
Index: libgnomevfs/gnome-vfs-monitor.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-monitor.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 gnome-vfs-monitor.c
--- libgnomevfs/gnome-vfs-monitor.c	29 Jan 2002 09:14:07 -0000	1.2
+++ libgnomevfs/gnome-vfs-monitor.c	16 May 2002 15:05:03 -0000
@@ -200,8 +200,8 @@ gnome_vfs_monitor_callback (GnomeVFSMeth
 	g_assert (monitor_handle != NULL);
 	callback_data->monitor_handle = monitor_handle;
 	if (info_uri != NULL) {
-		callback_data->info_uri = gnome_vfs_uri_to_string(info_uri, 
-				GNOME_VFS_URI_HIDE_NONE);
+		callback_data->info_uri = gnome_vfs_uri_to_string
+			(info_uri, GNOME_VFS_URI_HIDE_NONE);
 	} else {
 		callback_data->info_uri = NULL;
 	}
Index: modules/file-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/file-method.c,v
retrieving revision 1.103
diff -u -p -u -r1.103 file-method.c
--- modules/file-method.c	2 May 2002 02:43:31 -0000	1.103
+++ modules/file-method.c	16 May 2002 15:05:04 -0000
@@ -2088,6 +2088,7 @@ fam_callback (GIOChannel *source,
 			gnome_vfs_monitor_callback (
 					(GnomeVFSMethodHandle *)handle,
 					info_uri, event_type);
+			gnome_vfs_uri_unref (info_uri);
 		}
 	}
 

-- 
 [email protected]  <><, Pseudo Engineer, itinerant idiot


_______________________________________________
gnome-vfs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gnome-vfs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.