]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: rename of non-existent image results in seg fault 17556/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 5 Sep 2017 16:11:45 +0000 (12:11 -0400)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 7 Sep 2017 12:53:58 +0000 (14:53 +0200)
Fixes: http://tracker.ceph.com/issues/21248
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 4a75ee43d3b108a9593a010160479fd62884eda8)

src/librbd/internal.cc

index 70c706c6d4beec42e45430c0e2f894f157ad6363..5977231bdd5cad8caaa83bf9d27d7c765e146a5e 100644 (file)
@@ -970,8 +970,7 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
     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;
       return r;
     }
     BOOST_SCOPE_EXIT((ictx)) {