Memory leak in gnome-vfs-daemon

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

I recently noticed that after getting Rhythmbox to import music from a
SMB share gnome-vfs-daemon was using about 60Mb of private dirty heap
space. After valgrind-ing it, it looks like GnomeVFSURIs are being
leaked quite often.

Looking at the code, it seems fairly obvious where the leak is, and the
patch below fixes it for me. I'm not subscribed to the list, so if there
are any questions could you CC me.

Cheers,


Index: daemon/daemon-connection.c
===================================================================
--- daemon/daemon-connection.c  (revision 5416)
+++ daemon/daemon-connection.c  (working copy)
@@ -1365,6 +1365,7 @@ connection_handle_get_file_info (DaemonC
                                                          info,
                                                          options,
                                                          context);
+       gnome_vfs_uri_unref (uri);
        gnome_vfs_daemon_set_current_connection (NULL);
 
        if (cancellation) {
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.