diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2015-08-25 00:13:49 +0100 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2015-08-26 21:40:41 +0100 |
commit | 5b9c31a0cece7852a22a76e24a4738cb4c773d1d (patch) | |
tree | 9d7c3a1c70dfa4034094e71063884b5351df7e29 | |
parent | 84ad306a6598b831c4827cb6151a7f1bde33a6ff (diff) | |
download | clutter-5b9c31a0cece7852a22a76e24a4738cb4c773d1d.tar.gz |
gdk: fix memory corruption
g_hash_table_replace will free the list pointer we're modifying.
Let's just do memory management ourselves.
https://bugzilla.gnome.org/show_bug.cgi?id=754134
-rw-r--r-- | clutter/gdk/clutter-master-clock-gdk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clutter/gdk/clutter-master-clock-gdk.c b/clutter/gdk/clutter-master-clock-gdk.c index 91872c4ec..6a4a48050 100644 --- a/clutter/gdk/clutter-master-clock-gdk.c +++ b/clutter/gdk/clutter-master-clock-gdk.c @@ -310,6 +310,7 @@ clutter_master_clock_gdk_remove_stage_clock (ClutterMasterClockGdk *master_clock clutter_master_clock_gdk_update, master_clock); g_hash_table_remove (master_clock->clock_to_stage, frame_clock); + g_list_free (stages); } else { @@ -461,7 +462,7 @@ clutter_master_clock_gdk_init (ClutterMasterClockGdk *self) const GSList *stages, *l; self->clock_to_stage = g_hash_table_new_full (g_direct_hash, g_direct_equal, - g_object_unref, (GDestroyNotify) g_list_free); + g_object_unref, NULL); self->stage_to_clock = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_object_unref); |