aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Muscariello <muscariello@ieee.org>2022-10-18 07:44:25 +0000
committerGerrit Code Review <gerrit@fd.io>2022-10-18 07:44:25 +0000
commit2c3f5724db831ce599ad678b3e39661e19e3c95c (patch)
treee28e1f72b2dce51dff157a94e4e0cc5cedbd767f
parent1544e6704772e3d37386abde947777dce8a89fae (diff)
parente80b1f8d8f0380b499bac8215da304a11b6ce75b (diff)
Merge "fix(hicn-light): access to field 'local' results in a dereference of a null pointer"
-rw-r--r--hicn-light/src/hicn/test/test-strategy-local-remote.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/hicn-light/src/hicn/test/test-strategy-local-remote.cc b/hicn-light/src/hicn/test/test-strategy-local-remote.cc
index 413ac4080..6693e29c8 100644
--- a/hicn-light/src/hicn/test/test-strategy-local-remote.cc
+++ b/hicn-light/src/hicn/test/test-strategy-local-remote.cc
@@ -131,9 +131,12 @@ TEST_F(StrategyLocalRemoteTest, InputRemoteOutputRemote) {
// fake two remote connections
conn = connection_table_get_by_id(forwarder_get_connection_table(fwd_),
prod_conn_id);
+ ASSERT_TRUE(conn != NULL);
conn->local = false;
+
conn = connection_table_get_by_id(forwarder_get_connection_table(fwd_),
cons_conn_id);
+ ASSERT_TRUE(conn != NULL);
conn->local = false;
msgbuf_.connection_id = cons_conn_id;
@@ -171,9 +174,11 @@ TEST_F(StrategyLocalRemoteTest, InputLocalOutputRemote) {
conn = connection_table_get_by_id(forwarder_get_connection_table(fwd_),
prod_conn_id);
+ ASSERT_TRUE(conn != NULL);
conn->local = false;
conn = connection_table_get_by_id(forwarder_get_connection_table(fwd_),
cons_conn_id);
+ ASSERT_TRUE(conn != NULL);
conn->local = true;
msgbuf_.connection_id = cons_conn_id;