From: Ryan Lortie Date: Fri, 12 Dec 2008 20:03:36 +0000 (+0000) Subject: fix leak that occurs when multiple mount entries match the requested path X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=a28d87bfc987d8b0aa27c6f9d996a31894fedf4a;p=dana%2Fcg-glib.git fix leak that occurs when multiple mount entries match the requested path 2008-12-12 Ryan Lortie * gio/gunixmounts.c (g_unix_mount_at): fix leak that occurs when multiple mount entries match the requested path svn path=/trunk/; revision=7742 --- diff --git a/ChangeLog b/ChangeLog index e4fd0e25..0a205377 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-12 Ryan Lortie + + * gio/gunixmounts.c (g_unix_mount_at): fix leak that occurs when + multiple mount entries match the requested path + 2008-12-12 Behdad Esfahbod * glib/guniprop.c: Improve g_unichar_iswide_cjk() docs. diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index 6b95d74b..87efce42 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -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);