Skip to content

Commit 0e00093

Browse files
committed
rgw/http: finish_request() after logging errors
the http manager's background thread is processing responses and logging any errors. but its call to finish_request() -> complete_request() drops its reference with req_data->put() before logging the error message in req_data->error_buf. if put() dropped the last reference, we'd access error_buf after it's freed Fixes: https://tracker.ceph.com/issues/67522 Signed-off-by: Casey Bodley <[email protected]>
1 parent dbcd888 commit 0e00093

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rgw/rgw_http_client.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,6 @@ void *RGWHTTPManager::reqs_thread_entry()
11471147
http_status = err.http_ret;
11481148
}
11491149
int id = req_data->id;
1150-
finish_request(req_data, status, http_status);
11511150
switch (result) {
11521151
case CURLE_OK:
11531152
break;
@@ -1160,6 +1159,7 @@ void *RGWHTTPManager::reqs_thread_entry()
11601159
dout(20) << "ERROR: curl error: " << curl_easy_strerror((CURLcode)result) << " req_data->error_buf=" << req_data->error_buf << dendl;
11611160
break;
11621161
}
1162+
finish_request(req_data, status, http_status);
11631163
}
11641164
}
11651165
}

0 commit comments

Comments
 (0)