]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: fix leak of WatchContext on unwatch 3277/head
authorSage Weil <sage@redhat.com>
Mon, 5 Jan 2015 17:36:43 +0000 (09:36 -0800)
committerSage Weil <sage@redhat.com>
Mon, 5 Jan 2015 17:36:43 +0000 (09:36 -0800)
The lifecycle matches that of the watch linger_op.  Note that it is NULL
for notify.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.h

index 09691135b2ae2728c1a01c215265ec4fb350f0ea..d909fa3c24c4eea071f31b833df92dd55ea483c3 100644 (file)
@@ -1535,7 +1535,9 @@ public:
     }
 
   private:
-    ~LingerOp() {}
+    ~LingerOp() {
+      delete watch_context;
+    }
   };
 
   struct C_Linger_Register : public Context {