From a28d87bfc987d8b0aa27c6f9d996a31894fedf4a Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 12 Dec 2008 20:03:36 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ gio/gunixmounts.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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); -- 2.34.1