Skip to content

Commit 71ef3af

Browse files
committed
rgw: fix segfault in UserAsyncRefreshHandler::init_fetch
Fixes a segfault that was occuring in error handling code of UserAsyncRefreshHandler::init_fetch. When ruser->read_stats_async returned an error code, the instance of UserAsyncRefreshHandler had already been deallocated in RGWSI_User_RADOS::read_stats_async and a segmentation fault occurs when attempting to print a member variable in error logs. This commit removes the extra ref count drop since the ref is properly dropped upstream in RGWQuotaCache::async_refresh error handling logic. Fixes: https://tracker.ceph.com/issues/54112 Signed-off-by: Cory Snyder <[email protected]>
1 parent 40a7174 commit 71ef3af

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/rgw/services/svc_user_rados.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,6 @@ int RGWSI_User_RADOS::read_stats_async(const DoutPrefixProvider *dpp, RGWSI_Meta
973973
RGWGetUserStatsContext *cb = new RGWGetUserStatsContext(_cb);
974974
int r = cls_user_get_header_async(dpp, user_str, cb);
975975
if (r < 0) {
976-
_cb->put();
977976
delete cb;
978977
return r;
979978
}

0 commit comments

Comments
 (0)