kvs->aio_xxx is asynchronous function, cb_args will be used and deleted
in aio_callbcak_timed, delete cb_agrs in test_teuthology_aio will cause
double free error.
Signed-off-by: Xuqiang Chen <chenxuqiang3@hisilicon.com>
Signed-off-by: luo rixin <luorixin@huawei.com>
delete cb_args;
continue;
}
- bufferlist val;
ops_in_flight++;
cb_args->sw.start_time();
kvs->aio_get(kv.first, &cb_args->val, aio_callback_timed,
cb_args, &cb_args->err);
break;
+ default:
+ // shouldn't happen here
+ assert(false);
}
- delete cb_args;
}
op_avail.wait(l, [this] { return ops_in_flight <= 0; });