Skip to content

Commit

Permalink
Merge pull request #49951 from ivancich/wip-clean-up-2023-Jan-23-cove…
Browse files Browse the repository at this point in the history
…rity

rgw: clean up January 21, 2023 coverity scan issues

Reviewed-by: Soumya Koduri <[email protected]>
Reviewed-by: Adam C. Emerson <[email protected]>
  • Loading branch information
ivancich authored Feb 18, 2023
2 parents 6042a4c + 270560b commit bf6d9f8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rgw/driver/rados/rgw_data_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5624,7 +5624,7 @@ class RGWSyncBucketCR : public RGWCoroutine {
rgw_raw_obj error_repo;
rgw_bucket_shard source_bs;
rgw_pool pool;
uint64_t current_gen;
uint64_t current_gen = 0;

RGWSyncTraceNodeRef tn;

Expand Down
17 changes: 15 additions & 2 deletions src/rgw/services/svc_mdlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,15 @@ class SysObjReadCR : public RGWSimpleCoroutine {
: RGWSimpleCoroutine(_svc->ctx()), dpp(_dpp), async_rados(_async_rados), svc(_svc),
obj(_obj), result(_result),
empty_on_enoent(empty_on_enoent), objv_tracker(objv_tracker) {}

~SysObjReadCR() override {
request_cleanup();
try {
request_cleanup();
} catch (const boost::container::length_error_t& e) {
ldpp_dout(dpp, 0) << "ERROR: " << __func__ <<
": reference counted object mismatched, \"" << e.what() <<
"\"" << dendl;
}
}

void request_cleanup() override {
Expand Down Expand Up @@ -209,7 +216,13 @@ class SysObjWriteCR : public RGWSimpleCoroutine {
}

~SysObjWriteCR() override {
request_cleanup();
try {
request_cleanup();
} catch (const boost::container::length_error_t& e) {
ldpp_dout(dpp, 0) << "ERROR: " << __func__ <<
": reference counted object mismatched, \"" << e.what() <<
"\"" << dendl;
}
}

void request_cleanup() override {
Expand Down

0 comments on commit bf6d9f8

Please sign in to comment.