From: Sage Weil Date: Mon, 5 Jan 2015 17:36:43 +0000 (-0800) Subject: librados: fix leak of WatchContext on unwatch X-Git-Tag: v0.91~7^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5cf84e6393f1fa8c3bebc815bd6ca9ad05dc9e7c;p=ceph.git 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 --- diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 09691135b2ae..d909fa3c24c4 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 {