]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/rgw_orphan: check the return value of save_state
authorBoris Ranto <branto@redhat.com>
Sat, 6 Feb 2016 01:00:22 +0000 (02:00 +0100)
committerBoris Ranto <branto@redhat.com>
Sat, 6 Feb 2016 01:09:00 +0000 (02:09 +0100)
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 <branto@redhat.com>
src/rgw/rgw_orphan.cc

index f59e1f75db4f794f7f240c3d455d0bdc980055f6..861b89c84d2785fb94c43370e5b1dc46e2353017 100644 (file)
@@ -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;
 }