From: runsisi Date: Thu, 27 Apr 2017 12:22:57 +0000 (+0800) Subject: librbd: do not delete ictx twice if open image failed X-Git-Tag: v12.0.3~76^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7580994cd814d2175946eea73e709d13e1868269;p=ceph.git librbd: do not delete ictx twice if open image failed Signed-off-by: runsisi --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 7558169c9e46..780f2df6c657 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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; }