[Xfce4-commits] <parole:0.2.2> Fix memory leak in the previous commit

Ali Abdallah noreply at xfce.org
Thu Jan 14 21:40:06 CET 2010


Updating branch refs/heads/0.2.2
         to 545eb671487e884eb2bf44fe0296d7a163fedc5f (commit)
       from 6b53cbaeb97e0b73837b5863e58049e047017d62 (commit)

commit 545eb671487e884eb2bf44fe0296d7a163fedc5f
Author: Ali Abdallah <aliov at xfce.org>
Date:   Thu Jan 14 21:20:36 2010 +0100

    Fix memory leak in the previous commit

 src/parole-utils.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/parole-utils.c b/src/parole-utils.c
index f52e857..b0cb8c8 100644
--- a/src/parole-utils.c
+++ b/src/parole-utils.c
@@ -565,18 +565,22 @@ parole_get_uri_from_unix_device (const gchar *device)
 	{
 	    gchar *unix_device;
 	    unix_device = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
-	    
+
 	    if ( !g_strcmp0 (unix_device, device) )
 	    {
 		GMount *mount;
 		mount = g_volume_get_mount (volume);
+		
 		if ( mount )
 		{
 		    uri = parole_guess_uri_from_mount (mount);
 		    g_object_unref (mount);
+		    g_object_unref (drive);
+		    g_free (unix_device);
 		    break;
 		}
 	    }
+	    g_free (unix_device);
 	}
 	
 	g_object_unref (drive);



More information about the Xfce4-commits mailing list