From: Alexander Larsson Date: Wed, 9 Jan 2008 08:08:43 +0000 (+0000) Subject: Fix double free crash (#508224) Patch from Joe Marcus Clarke X-Git-Tag: GLIB_2_15_2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91d7fdc18642d7d62764c9d28d64c4dc32826fe9;p=platform%2Fupstream%2Fglib.git Fix double free crash (#508224) Patch from Joe Marcus Clarke 2008-01-09 Alexander Larsson * fam/fam-helper.c: * fam/gfamdirectorymonitor.c: * fam/gfamfilemonitor.c: Fix double free crash (#508224) Patch from Joe Marcus Clarke svn path=/trunk/; revision=6281 --- diff --git a/gio/ChangeLog b/gio/ChangeLog index 5f3a262..276f416 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,11 @@ +2008-01-09 Alexander Larsson + + * fam/fam-helper.c: + * fam/gfamdirectorymonitor.c: + * fam/gfamfilemonitor.c: + Fix double free crash (#508224) + Patch from Joe Marcus Clarke + 008-01-07 Matthias Clasen * === Released 2.15.1 === diff --git a/gio/fam/fam-helper.c b/gio/fam/fam-helper.c index fb48861..4301f12 100644 --- a/gio/fam/fam-helper.c +++ b/gio/fam/fam-helper.c @@ -82,7 +82,7 @@ fam_do_iter_unlocked (void) cancelled = sub->cancelled; if (ev.code == FAMAcknowledge && cancelled) { - g_free (sub); + _fam_sub_free (sub); continue; } diff --git a/gio/fam/gfamdirectorymonitor.c b/gio/fam/gfamdirectorymonitor.c index 96852bb..b947de7 100644 --- a/gio/fam/gfamdirectorymonitor.c +++ b/gio/fam/gfamdirectorymonitor.c @@ -50,7 +50,6 @@ g_fam_directory_monitor_finalize (GObject *object) if (!_fam_sub_cancel (sub)) g_warning ("Unexpected error cancelling fam monitor"); - _fam_sub_free (sub); fam_monitor->sub = NULL; } @@ -134,7 +133,6 @@ g_fam_directory_monitor_cancel (GFileMonitor* monitor) if (!_fam_sub_cancel (sub)) g_warning ("Unexpected error cancelling fam monitor"); - _fam_sub_free (sub); fam_monitor->sub = NULL; } diff --git a/gio/fam/gfamfilemonitor.c b/gio/fam/gfamfilemonitor.c index be36318..78d3df9 100644 --- a/gio/fam/gfamfilemonitor.c +++ b/gio/fam/gfamfilemonitor.c @@ -49,7 +49,6 @@ g_fam_file_monitor_finalize (GObject *object) if (sub) { if (!_fam_sub_cancel (sub)) g_warning ("Unexpected error cancelling fam monitor"); - _fam_sub_free (sub); fam_monitor->sub = NULL; } @@ -132,7 +131,6 @@ g_fam_file_monitor_cancel (GFileMonitor* monitor) if (sub) { if (!_fam_sub_cancel (sub)) g_warning ("Unexpected error cancelling fam monitor"); - _fam_sub_free (sub); fam_monitor->sub = NULL; }