Skip to content

Commit

Permalink
Coverity issues in VmFlowRef constructor
Browse files Browse the repository at this point in the history
Coverity reports the following issues in the VmFlowRef(const VmFlowRef &rhs) constructor:

Using uninitialized value this->fd_(59780)
Non-static class member fd_ is not initialized in this constructor nor in any functions that it calls.
Non-static class member port_ is not initialized in this constructor nor in any functions that it calls.
Non-static class member flow_ is not initialized in this constructor nor in any functions that it calls. (59794).

Change-Id: Iaf29a87a0adc4746559a1ca9ddf3ee4fc6e41136
Closes-Bug: #1773354
  • Loading branch information
abgzlnv committed May 25, 2018
1 parent f43f0f6 commit 38c8a8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vnsw/agent/pkt/flow_entry.cc
Expand Up @@ -111,6 +111,11 @@ VmFlowRef::VmFlowRef() :
}

VmFlowRef::VmFlowRef(const VmFlowRef &rhs) {

fd_ = VmFlowRef::kInvalidFd;
port_ = 0;
flow_ = NULL;

// UPDATE on linklocal flows is not supported. So, fd_ should be invalid
assert(fd_ == VmFlowRef::kInvalidFd);
assert(rhs.fd_ == VmFlowRef::kInvalidFd);
Expand Down

0 comments on commit 38c8a8e

Please sign in to comment.