]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librados: postpone cct deletion
authorKefu Chai <kchai@redhat.com>
Wed, 26 Oct 2016 09:21:41 +0000 (17:21 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 26 Oct 2016 15:20:10 +0000 (23:20 +0800)
commit8b19229df364a166c1ed78b97234438800e77521
tree58126d484ef9f2c422bf82e314b2549f5268ab5f
parent0919de25cbb3cd283272767ef57301b218a1d3c6
librados: postpone cct deletion

RefCountedObject::put() prints log using cct, but RadosClient
relinquishes the reference to cct too early, so when its
`RefCountedObject` member variables print log when they are
destructed, the cct is already freed. hence we have a segfault.

to address this problem, we need postpone destructure of it after all
other RefCountedObject member variables are destroyed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/librados/RadosClient.cc
src/librados/RadosClient.h