fix leak that occurs when multiple mount entries match the requested path

2008-12-12  Ryan Lortie  <desrt@desrt.ca>

        * gio/gunixmounts.c (g_unix_mount_at): fix leak that occurs when
        multiple mount entries match the requested path


svn path=/trunk/; revision=7742
This commit is contained in:
Ryan Lortie
2008-12-12 20:03:36 +00:00
committed by Ryan Lortie
parent 2152bd091e
commit a28d87bfc9
2 changed files with 6 additions and 1 deletions

View File

@@ -1054,7 +1054,7 @@ g_unix_mount_at (const char *mount_path,
{
mount_entry = l->data;
if (strcmp (mount_path, mount_entry->mount_path) == 0)
if (!found && strcmp (mount_path, mount_entry->mount_path) == 0)
found = mount_entry;
else
g_unix_mount_free (mount_entry);