GTimeZone: fix non-threadsafe refcounting
authorRyan Lortie <desrt@desrt.ca>
Thu, 14 Apr 2011 13:54:17 +0000 (09:54 -0400)
committerRyan Lortie <desrt@desrt.ca>
Thu, 14 Apr 2011 13:56:00 +0000 (09:56 -0400)
commit8b03077a44092ce2b510ef3246da063cacc8d951
tree615feaed58a597bc91a697175bc40c8f18ff1286
parente38ef14e8b8d2fed909d92514b665bb8c3c99e6c
GTimeZone: fix non-threadsafe refcounting

In the previous code, if the timezone was pulled out of the cache again
just as the last reference was being dropped, the cache code will
increase its refcount and return it while the unref code was freeing it.

Protect against that.

Closes #646435.
glib/gtimezone.c