Merge pull request #23639 from trociny/wip-24910

librbd: potential race on image create request complete

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2018-08-20 09:11:17 -04:00 committed by GitHub
commit 33bc68caf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -737,8 +737,9 @@ void CreateRequest<I>::complete(int r) {
}
m_data_io_ctx.close();
m_on_finish->complete(r);
auto on_finish = m_on_finish;
delete this;
on_finish->complete(r);
}
// cleanup