From a48c081d203c5cc10e36546b2d1c0a429ba3480f Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Sat, 6 Feb 2016 02:00:22 +0100 Subject: [PATCH] rgw/rgw_orphan: check the return value of save_state It was discovered by covscan that we do not check the return value of save_state in this one case. Signed-off-by: Boris Ranto --- src/rgw/rgw_orphan.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_orphan.cc b/src/rgw/rgw_orphan.cc index f59e1f75db4f..861b89c84d27 100644 --- a/src/rgw/rgw_orphan.cc +++ b/src/rgw/rgw_orphan.cc @@ -578,7 +578,11 @@ int RGWOrphanSearch::build_linked_oids_index() return ret; } - save_state(); + ret = save_state(); + if (ret < 0) { + cerr << __func__ << ": ERROR: failed to write state ret=" << ret << std::endl; + return ret; + } return 0; } -- 2.47.3