From: Jason Dillaman Date: Tue, 5 Sep 2017 16:11:45 +0000 (-0400) Subject: librbd: rename of non-existent image results in seg fault X-Git-Tag: v10.2.11~158^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ad7f35c3641e440ffd91323573bcb35f7b2f88c6;p=ceph.git librbd: rename of non-existent image results in seg fault Fixes: http://tracker.ceph.com/issues/21248 Signed-off-by: Jason Dillaman (cherry picked from commit 4a75ee43d3b108a9593a010160479fd62884eda8) Conflicts: src/librbd/internal.cc (retain redundant "delete ictx" that has been dropped in master) --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index faac54e2e7949..e2360d288dec3 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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; }