]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: rename of non-existent image results in seg fault 20280/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 5 Sep 2017 16:11:45 +0000 (12:11 -0400)
committerNathan Cutler <ncutler@suse.com>
Sat, 3 Feb 2018 19:12:17 +0000 (20:12 +0100)
Fixes: http://tracker.ceph.com/issues/21248
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 4a75ee43d3b108a9593a010160479fd62884eda8)

Conflicts:
        src/librbd/internal.cc (retain redundant "delete ictx" that has been
            dropped in master)

src/librbd/internal.cc

index faac54e2e7949d57931c68a1d5c677ecfdab4ce3..e2360d288dec37653d2e30a8d88a84cf9bab14c5 100644 (file)
@@ -1666,8 +1666,7 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
     ImageCtx *ictx = new ImageCtx(srcname, "", "", io_ctx, false);
     int r = ictx->state->open(false);
     if (r < 0) {
-      lderr(ictx->cct) << "error opening source image: " << cpp_strerror(r)
-                      << dendl;
+      lderr(cct) << "error opening source image: " << cpp_strerror(r) << dendl;
       delete ictx;
       return r;
     }