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=refs%2Fpull%2F3277%2Fhead;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 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 {