Bug 561375 – Leaks mountpoint description
authorCosimo Cecchi <cosimoc@gnome.org>
Fri, 21 Nov 2008 00:01:22 +0000 (00:01 +0000)
committerCosimo Cecchi <cosimoc@src.gnome.org>
Fri, 21 Nov 2008 00:01:22 +0000 (00:01 +0000)
2008-11-21  Cosimo Cecchi  <cosimoc@gnome.org>

Bug 561375 – Leaks mountpoint description

* glocalfile.c: (get_mount_info): don't leak the mountpoint description
string.

svn path=/trunk/; revision=7662

gio/ChangeLog
gio/glocalfile.c

index cd0250ccce5dc9020997284bf307ea74883a9be5..97c3ea668fa9ec9ba3d396f284417e3c66bb4768 100644 (file)
@@ -1,3 +1,10 @@
+2008-11-21  Cosimo Cecchi  <cosimoc@gnome.org>
+
+       Bug 561375 – Leaks mountpoint description
+
+       * glocalfile.c: (get_mount_info): don't leak the mountpoint description
+       string.
+
 2008-11-21  Cosimo Cecchi  <cosimoc@gnome.org>
 
        Bug 561352 – Leak of icon description
index 9577e726bbe7289f5e008fc409788d4d9bc0bb0e..fb890db60a3462fc1d53ea490ce037a024406362 100644 (file)
@@ -779,7 +779,7 @@ get_mount_info (GFileInfo             *fs_info,
 
       mountpoint = find_mountpoint_for (path, buf.st_dev);
       if (mountpoint == NULL)
-       mountpoint = "/";
+       mountpoint = g_strdup ("/");
 
       mount = g_unix_mount_at (mountpoint, &cache_time);
       if (mount)
@@ -790,6 +790,8 @@ get_mount_info (GFileInfo             *fs_info,
          g_unix_mount_free (mount);
        }
 
+      g_free (mountpoint);
+
       dev = g_new0 (dev_t, 1);
       *dev = buf.st_dev;