From 5cf84e6393f1fa8c3bebc815bd6ca9ad05dc9e7c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 5 Jan 2015 09:36:43 -0800 Subject: [PATCH] librados: fix leak of WatchContext on unwatch The lifecycle matches that of the watch linger_op. Note that it is NULL for notify. Signed-off-by: Sage Weil --- src/osdc/Objecter.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 09691135b2a..d909fa3c24c 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -1535,7 +1535,9 @@ public: } private: - ~LingerOp() {} + ~LingerOp() { + delete watch_context; + } }; struct C_Linger_Register : public Context { -- 2.47.3