From e36babc825caf2e6836649308ac431b5dccc83c5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 3 Aug 2014 11:23:33 -0700 Subject: [PATCH] os/MemStore: fix lock leak CID 1228868 (#2-1 of 2): Missing unlock (LOCK) 12. missing_unlock: Returning without unlocking oc->lock.L. Signed-off-by: Sage Weil --- src/os/MemStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/MemStore.cc b/src/os/MemStore.cc index 9b496e24b0131..3fdab0f0c27f0 100644 --- a/src/os/MemStore.cc +++ b/src/os/MemStore.cc @@ -1404,7 +1404,7 @@ int MemStore::_collection_move_rename(coll_t oldcid, const ghobject_t& oldoid, r = 0; out: c->lock.put_write(); - if (c != oc) + if (&(*c) != &(*oc)) oc->lock.put_write(); return r; } -- 2.39.5