]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/MemStore: fix lock leak
authorSage Weil <sage@redhat.com>
Sun, 3 Aug 2014 18:23:33 +0000 (11:23 -0700)
committerSage Weil <sage@redhat.com>
Sun, 3 Aug 2014 18:23:33 +0000 (11:23 -0700)
CID 1228868 (#2-1 of 2): Missing unlock (LOCK)
12. missing_unlock: Returning without unlocking oc->lock.L.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/MemStore.cc

index 9b496e24b013175d7a5fea7dbb299996b543f50b..3fdab0f0c27f01c3abf206792f0cb89247a8ff8c 100644 (file)
@@ -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;
 }