Skip to content

Commit

Permalink
Coverity issue in contrail-controller/ovsdb_client_connection_state.cc
Browse files Browse the repository at this point in the history
I have run Coverity on branch R5.0 and it reported the
following issue in
contrail-controller/ovsdb_client_connection_state.cc:PhysicalDeviceNotify()

deref_after_free: Dereferencing freed pointer state

Solution is to check if state!= NULL in:
"if (state->ha_stale_dev_vn_table_ != NULL) {".

Change-Id: Iafcf498adde07483af059d2302b9101d4fe860e4
Closes-Bug: #1777411
Signed-off-by: Anda Nicolae <anicolae@lenovo.com>
  • Loading branch information
Anda Nicolae committed Jun 18, 2018
1 parent c0093fe commit 820b40a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -129,7 +129,7 @@ void ConnectionStateTable::PhysicalDeviceNotify(DBTablePartBase *part,
}
dev->ClearState(table_, id_);

if (state->ha_stale_dev_vn_table_ != NULL) {
if (state && state->ha_stale_dev_vn_table_ != NULL) {
state->ha_stale_dev_vn_table_->DeleteTable();
state->ha_stale_dev_vn_table_ = NULL;
}
Expand Down

0 comments on commit 820b40a

Please sign in to comment.