rescrv/HyperLevelDB — pull request #13 by jsgf (2014-06-25 18:22:37+00:00)
Title: Fix race in MemTable::Unref

MemTable::Unref is decrementing the refcount on the MemTable, but after
the decremnt it tests the actual in-memory refcount for 0 rather than
the result returned from the atomic decrement. This means that even if
it doesn't drop the last reference, it can see the result of someone else
dropping the last reference, resulting in a double free.

Signed-off-by: Jeremy Fitzhardinge