diff options
author | Jason Dillaman <dillaman@redhat.com> | 2020-10-20 08:55:36 +0200 |
---|---|---|
committer | Jason Dillaman <dillaman@redhat.com> | 2020-11-01 15:22:38 +0100 |
commit | 43749377cbdfa1f64e157bcb8691c55d03a5aad5 (patch) | |
tree | 31fe523e593466e57c07f2207a0275f61670ce78 /src/librbd/api | |
parent | Merge pull request #36626 from lixiaoy1/rbd_image_discard (diff) | |
download | ceph-43749377cbdfa1f64e157bcb8691c55d03a5aad5.tar.xz ceph-43749377cbdfa1f64e157bcb8691c55d03a5aad5.zip |
librbd/api: ImageCtx must be closed instead of deleted
On error, the destination image context will need to be properly
closed instead of just deleted.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | src/librbd/api/Migration.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librbd/api/Migration.cc b/src/librbd/api/Migration.cc index d3c1e0479b0..565257168eb 100644 --- a/src/librbd/api/Migration.cc +++ b/src/librbd/api/Migration.cc @@ -753,7 +753,7 @@ int Migration<I>::prepare() { BOOST_SCOPE_EXIT_TPL(&m_dst_image_ctx) { if (m_dst_image_ctx != nullptr) { - delete m_dst_image_ctx; + m_dst_image_ctx->state->close(); } } BOOST_SCOPE_EXIT_END; |