From c14991abf0f5a74e7512c4ffebf00c0b33cf8798 Mon Sep 17 00:00:00 2001 From: amitkuma Date: Mon, 4 Sep 2017 23:05:12 +0530 Subject: [PATCH] table: Initialization of uninitialized fields Fixes the coverity issue: ** 1351695 Uninitialized pointer field 2. uninit_member: Non-static class member field cleanup_.arg1 is not initialized in this constructor nor in any functions that it calls. CID 1351695 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) 4. uninit_member: Non-static class member field cleanup_.arg2 is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Amit Kumar --- table/iterator.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/table/iterator.cc b/table/iterator.cc index 23a84b59e0f..3a1eb7462ae 100644 --- a/table/iterator.cc +++ b/table/iterator.cc @@ -17,6 +17,8 @@ namespace rocksdb { Cleanable::Cleanable() { cleanup_.function = nullptr; cleanup_.next = nullptr; + cleanup_.arg2 = nullptr; + cleanup_.arg2 = nullptr; } Cleanable::~Cleanable() { DoCleanup(); }