summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Farnum <greg@inktank.com>2013-10-04 09:47:54 -0700
committerGreg Farnum <greg@inktank.com>2013-10-04 12:59:05 -0700
commit639ff9f776bf7e18ba9d8bd0f73784df0bf02ce0 (patch)
tree684471d27c53624e413cd742f23a2ca55df91ed1
parent469d471a8b668e4001561898ab9b908aa28477a1 (diff)
downloadceph-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.h5
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;
}
}