]> git.sesse.net Git - vlc/commit
Remove useless i_refcount == 0 case and fix a tiny race condition.
authorRémi Denis-Courmont <rem@videolan.org>
Wed, 7 May 2008 19:40:48 +0000 (22:40 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Wed, 7 May 2008 19:41:01 +0000 (22:41 +0300)
commit19bd84c786fecb77531073b697aad4d3c221d15d
tree519e9748c0d3d171b8d6f53fd83dd1da61a8b02b
parent7b4e7dc93dd9bf941bcfe2e2911bbf1de86d7bc6
Remove useless i_refcount == 0 case and fix a tiny race condition.

When i_refcount drops to zero (under the structure lock), the object is
removed from the objects table before the structure lock is released.
Hence, no objects with a nul refcount can ever be left in the table.

There is an unlikely race condition if another object is removed from
the table right between we unlock the structure lock but before we
return from vlc_object_get() (so that the i_middle offset gets wrong).
src/misc/objects.c