]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: correct valgrind memcheck errors
authorJason Dillaman <dillaman@redhat.com>
Tue, 15 Mar 2016 16:27:04 +0000 (12:27 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 15 Mar 2016 16:27:04 +0000 (12:27 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/Operations.cc
src/test/librbd/test_librbd.cc

index 7279d25ee9376ff956abb4e916e578a9730828f9..f8151c9d3a0285a0f02d4d73cd5bd82706acebab 100644 (file)
@@ -214,7 +214,8 @@ struct C_InvokeAsyncRequest : public Context {
 } // anonymous namespace
 
 template <typename I>
-Operations<I>::Operations(I &image_ctx) : m_image_ctx(image_ctx) {
+Operations<I>::Operations(I &image_ctx)
+  : m_image_ctx(image_ctx), m_async_request_seq(0) {
 }
 
 template <typename I>
index fc367165dcc0fdc7b9b5f1adf271523674b38916..cd9decf171e83e6d1adbaa117c853be58d5b19e7 100644 (file)
@@ -3836,6 +3836,7 @@ TEST_F(TestLibRBD, ExclusiveLockReadTransition)
     comps.pop_front();
     ASSERT_EQ(0, comp->wait_for_complete());
     ASSERT_EQ(1, comp->is_complete());
+    comp->release();
   }
 }