Context: C_ContextsBase: delete enclosed contexts in dtor

there are chances that these contexts are never finished/completed

Fixes: http://tracker.ceph.com/issues/20432
Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2017-07-06 16:06:33 +08:00
parent 08051155a4
commit 18ff5d6e59

View File

@ -217,7 +217,11 @@ public:
: cct(cct_)
{
}
~C_ContextsBase() override {
for (auto c : contexts) {
delete c;
}
}
void add(ContextType* c) {
contexts.push_back(c);
}