Memory leaks in GnomeVFS

"James \"Doc\" Livingston" <[email protected]>
Newsgroups gmane.comp.gnome.vfs.general
Message-ID <1196154883.8845.20.camel@alyrion>
Hi,

I think I've found a couple more memory leaks in gnomevfs, a patch is
below.


Cheers,
  James "Doc" Livingston


Index: libgnomevfs/gnome-vfs-daemon-method.c
===================================================================
--- libgnomevfs/gnome-vfs-daemon-method.c       (revision 5416)
+++ libgnomevfs/gnome-vfs-daemon-method.c       (working copy)
@@ -1262,6 +1262,7 @@ do_read_directory (GnomeVFSMethod       
                 * next call.
                 */
                if (!handle->current) {
+                       gnome_vfs_file_info_list_free (handle->dirs);
                        handle->dirs = NULL;
                }
        } else {
Index: libgnomevfs/gnome-vfs-monitor.c
===================================================================
--- libgnomevfs/gnome-vfs-monitor.c     (revision 5416)
+++ libgnomevfs/gnome-vfs-monitor.c     (working copy)
@@ -117,6 +117,8 @@ _gnome_vfs_monitor_do_add (GnomeVFSMetho
 
        if (result != GNOME_VFS_OK) {
                gnome_vfs_uri_unref (uri);
+               g_queue_foreach (handle->pending_callbacks, (GFunc)
free_callback_data, NULL);
+               g_queue_free (monitor_handle->pending_callbacks);
                g_free (monitor_handle);
                monitor_handle = NULL;
        } else {
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.