From: Greg Farnum Date: Fri, 4 Oct 2013 16:47:54 +0000 (-0700) Subject: ReplicatedPG: copy: don't leak a ctx on failed copy ops X-Git-Tag: v0.71~22^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=639ff9f776bf7e18ba9d8bd0f73784df0bf02ce0;p=ceph.git ReplicatedPG: copy: don't leak a ctx on failed copy ops Signed-off-by: Greg Farnum --- diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 2a8b722c752c..f337a8f42022 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -180,11 +180,10 @@ public: } ctx->copy_cb = NULL; if (r < 0) { - if (r == -ECANCELED) { // toss it out; client resends - delete ctx; - } else { + if (r != -ECANCELED) { // on cancel just toss it out; client resends ctx->pg->osd->reply_op_error(ctx->op, r); } + delete ctx; } }