Skip to content

Commit

Permalink
table: Initialization of uninitialized fields
Browse files Browse the repository at this point in the history
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 (ceph#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 <amitkuma@redhat.com>
  • Loading branch information
amitkuma committed Sep 4, 2017
1 parent 06b37ee commit c14991a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions table/iterator.cc
Expand Up @@ -17,6 +17,8 @@ namespace rocksdb {
Cleanable::Cleanable() {
cleanup_.function = nullptr;
cleanup_.next = nullptr;
cleanup_.arg2 = nullptr;
cleanup_.arg2 = nullptr;
}

Cleanable::~Cleanable() { DoCleanup(); }
Expand Down

0 comments on commit c14991a

Please sign in to comment.