]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: rename of non-existent image results in seg fault
authorJason Dillaman <dillaman@redhat.com>
Tue, 5 Sep 2017 16:11:45 +0000 (12:11 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 5 Sep 2017 16:11:45 +0000 (12:11 -0400)
Fixes: http://tracker.ceph.com/issues/21248
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/internal.cc

index 3198a5c3a9cad4b99e179dc6aa4cdc0e3c1cb270..acbe336629ccd4c52aee6ed94e4e06a533865b30 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)) {