]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw Initialize pointer field in RGWReadMDLogEntriesCR 16021/head
authorJos Collin <jcollin@redhat.com>
Thu, 29 Jun 2017 15:23:45 +0000 (20:53 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 12 Jul 2017 16:03:04 +0000 (21:33 +0530)
Fixes the Coverity Scan Report:
CID 1396155: Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member req is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/rgw/rgw_sync.cc

index bef949a53b0c481e34b60c4bcab76c92bfc7b9ac..2dce49fd8932879a9e5b25db9e40fbfe08d37a31 100644 (file)
@@ -414,7 +414,7 @@ class RGWReadMDLogEntriesCR : public RGWSimpleCoroutine {
   list<cls_log_entry> *entries;
   bool *truncated;
 
-  RGWAsyncReadMDLogEntries *req;
+  RGWAsyncReadMDLogEntries *req{nullptr};
 
 public:
   RGWReadMDLogEntriesCR(RGWMetaSyncEnv *_sync_env, RGWMetadataLog* mdlog,