]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: initialize done in C_NotifyComplete
authorJosh Durgin <josh.durgin@dreamhost.com>
Mon, 14 Mar 2011 21:33:26 +0000 (14:33 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Mon, 14 Mar 2011 21:44:44 +0000 (14:44 -0700)
Caught by valgrind, this was uninitialized in the caller.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/librados.cc

index b4ceedfceb1dcb92eb70b04501ed99527a32e598..8627288f8fb9dbd7e2382609d8feb4be359c26a9 100644 (file)
@@ -480,7 +480,9 @@ public:
     Cond *cond;
     bool *done;
 
-    C_NotifyComplete(Mutex *_l, Cond *_c, bool *_d) : lock(_l), cond(_c), done(_d) {}
+    C_NotifyComplete(Mutex *_l, Cond *_c, bool *_d) : lock(_l), cond(_c), done(_d) {
+      *done = false;
+    }
 
     void notify(uint8_t opcode, uint64_t ver) {
       if (opcode != WATCH_NOTIFY_COMPLETE)