]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
journaler: delete Contexts on finish() in new functions.
authorGreg Farnum <gregf@hq.newdream.net>
Mon, 20 Dec 2010 22:35:23 +0000 (14:35 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 6 Jan 2011 19:12:14 +0000 (11:12 -0800)
Previously we weren't, and leaked memory.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
src/osdc/Journaler.cc

index c6148b775d4685f97b654ed0a84ff94e6ca43ddb..8552dd595aaeadd7afc5956b53f1731d924259e0 100644 (file)
@@ -169,6 +169,7 @@ void Journaler::_finish_reread_head(int r, bufferlist& bl, Context *finish)
   init_headers(h);
   state = STATE_ACTIVE;
   finish->finish(r);
+  delete finish;
 }
 
 void Journaler::_finish_read_head(int r, bufferlist& bl)
@@ -238,6 +239,7 @@ void Journaler::_finish_reprobe(int r, uint64_t new_end, Context *onfinish) {
   write_pos = flush_pos = ack_pos = safe_pos = new_end;
   state = STATE_ACTIVE;
   onfinish->finish(r);
+  delete onfinish;
 }
 
 void Journaler::_finish_probe_end(int r, uint64_t end)