]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/api/Migration: fix potential double-close of image 38068/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 17 Nov 2020 18:13:54 +0000 (13:13 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 23 Nov 2020 13:45:50 +0000 (08:45 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/api/Migration.cc

index b1f3542dbb98da985ea33815af0500c336658011..9f7d4d79149012f8cc8ea5db4673fdab2efa97d2 100644 (file)
@@ -269,6 +269,7 @@ int open_images(librados::IoCtx& io_ctx, const std::string &image_name,
       ldout(cct, 10) << "re-opening the destination image" << dendl;
       r = image_ctx->state->open(0);
       if (r < 0) {
+        image_ctx = nullptr;
         lderr(cct) << "failed to re-open destination image: " << cpp_strerror(r)
                    << dendl;
         return r;