Backport: dumpling
The pool async delete / create function used to delete the internal
completion object. However, caller still holds the allocated completion
object, which it can't drop a reference to (as it'd try to deallocate
the already freed internal object). This fix removes the internal object
deletion, a following commit will fix a related leak (#6444) by having
the application (radosgw) drop the reference even if got an error.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Context *onfinish = new C_PoolAsync_Safe(c);
int r = objecter->create_pool(name, onfinish, auid, crush_rule);
if (r < 0) {
- delete c;
delete onfinish;
}
return r;
Context *onfinish = new C_PoolAsync_Safe(c);
int r = objecter->delete_pool(tmp_pool_id, onfinish);
if (r < 0) {
- delete c;
delete onfinish;
}
return r;