Bug #14332
Updated by Nathan Cutler about 7 years ago
For example: <pre> int remove(IoCtx& io_ctx, const char *imgname, ProgressContext& prog_ctx) { CephContext *cct((CephContext *)io_ctx.cct()); ldout(cct, 20) << "remove " << &io_ctx << " " << imgname << dendl; string id; bool old_format = false; bool unknown_format = true; ImageCtx *ictx = new ImageCtx(imgname, "", NULL, io_ctx, false); int r = ictx->state->open(); if (r < 0) { ldout(cct, 2) << "error opening image: " << cpp_strerror(-r) << dendl; delete ictx; // shall manually delete ictx here. </pre>