]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: do not delete ictx twice if open image failed
authorrunsisi <runsisi@zte.com.cn>
Thu, 27 Apr 2017 12:22:57 +0000 (20:22 +0800)
committerrunsisi <runsisi@zte.com.cn>
Tue, 2 May 2017 02:16:47 +0000 (10:16 +0800)
Signed-off-by: runsisi <runsisi@zte.com.cn>
src/librbd/internal.cc

index 7558169c9e46437057301fafcb146bbfe18da276..780f2df6c657f45e03dae972790c55ff1fc2ce0d 100644 (file)
@@ -1351,7 +1351,6 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
     int r = ictx->state->open(true);
     if (r < 0) {
       ldout(cct, 2) << "error opening image: " << cpp_strerror(-r) << dendl;
-      delete ictx;
       if (r != -ENOENT) {
        return r;
       }