]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
Check for null hash or private while holding lock
authorTravis Cross <tc@traviscross.com>
Wed, 3 Sep 2014 19:42:25 +0000 (19:42 +0000)
committerTravis Cross <tc@traviscross.com>
Wed, 3 Sep 2014 19:45:45 +0000 (19:45 +0000)
commit7d11e199830cfbb0964f8a9b7936759fe8e5a755
tree80e2ed7cb1aebea7fc372d12c810f0b0feba136d
parent82a28e76e4f8bfd26bd3d7a921d4398325d1b37f
Check for null hash or private while holding lock

What if the hash were destroyed by one thread holding the lock while
another thread was waiting for the lock?  The waiting thread would
have already checked that the hash was non-null and would proceed on
that assumption after acquiring the lock.

With this commit we check only after acquiring the lock.

ref: FS-6783
ref: FS-6775
src/mod/applications/mod_hash/mod_hash.c