]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crypto: fix unbalanced ceph::crypto::init/ceph::crypto:shutdown
authorYan, Zheng <zyan@redhat.com>
Wed, 5 Aug 2015 07:19:13 +0000 (15:19 +0800)
committerSage Weil <sage@redhat.com>
Thu, 13 Aug 2015 14:46:03 +0000 (10:46 -0400)
commit4d4fe9dbc0eb0d0eaa9a608474fecc892626f542
treeaf11f37683eed854ce3fd7657536175778a9c708
parent6a1dbf30cf59e94275ca5081a20bc19f1e7385f5
crypto: fix unbalanced ceph::crypto::init/ceph::crypto:shutdown

we may create a CephContext without calling common_init_finish(), then
delete the CephContext. In this case, ceph::crypto:init() is not called,
so CephContext::~CephContext() should not call ceph::crypto::shutdown().

Fixes: #12598
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
src/common/ceph_context.cc
src/common/ceph_context.h
src/common/ceph_crypto.cc
src/common/common_init.cc