From 745a3c9ba047afb28d207d43cb52688ed342a3a1 Mon Sep 17 00:00:00 2001 From: Mike Ryan Date: Tue, 28 Aug 2012 11:57:03 -0700 Subject: [PATCH] rados_bench: wait for completion callbacks before returning If we don't wait for the callback, the finisher may cleanup the callback context before the callback is actually invoked, causing a use-after-free error. This fixes #3048. Signed-off-by: Mike Ryan --- src/rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rados.cc b/src/rados.cc index 8f8489a526686..50131e32f94c9 100644 --- a/src/rados.cc +++ b/src/rados.cc @@ -807,7 +807,7 @@ protected: } int completion_wait(int slot) { - return completions[slot]->wait_for_safe(); + return completions[slot]->wait_for_safe_and_cb(); } int completion_ret(int slot) { return completions[slot]->get_return_value(); -- 2.39.5