diff options
author | Greg Farnum <greg@inktank.com> | 2013-10-04 09:47:54 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-10-04 12:59:05 -0700 |
commit | 639ff9f776bf7e18ba9d8bd0f73784df0bf02ce0 (patch) | |
tree | 684471d27c53624e413cd742f23a2ca55df91ed1 | |
parent | 469d471a8b668e4001561898ab9b908aa28477a1 (diff) | |
download | ceph-639ff9f776bf7e18ba9d8bd0f73784df0bf02ce0.tar.gz |
ReplicatedPG: copy: don't leak a ctx on failed copy ops
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 2a8b722c752..f337a8f4202 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; } } |