g_object_unref racy condition can lead to crash
authorCody Russell <bratsche@gnome.org>
Tue, 6 Oct 2009 16:27:12 +0000 (12:27 -0400)
committerCody Russell <bratsche@gnome.org>
Tue, 6 Oct 2009 16:27:12 +0000 (12:27 -0400)
commit855deaa5780bfef3f6e8b3a41d00d6c7e40ca406
tree6266ec1bc6f0cae2015a943b01adb6a795141d66
parentafa0db59df9b28d9ae8da9539f629165cc8490f3
g_object_unref racy condition can lead to crash

Store whether the object has a toggleref before decrementing the
refcount to prevent race condition when two threads simultaneously
try to unref an object with a refcount of 2.
Patch by Antoine Tremblay.

https://bugzilla.gnome.org/show_bug.cgi?id=551706
gobject/gobject.c