summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-27 10:29:13 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-27 10:29:13 +0200
commit17927de2ad892aa5802d118ab71f041db0732f53 (patch)
treecde0ba3e52f60bc1a041cfda0a14d8b86a1130fd
parent68e9aaa32d87c72a28b1824c513c69129f63d849 (diff)
ss7_test: Avoid possible NULL pointer dereference in test case
Change-Id: If2a7b2c988d06e8bbd2a63f3a5ceeb403bfb34ed Fixes: coverity CID#166992
-rw-r--r--tests/ss7/ss7_test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/ss7/ss7_test.c b/tests/ss7/ss7_test.c
index 24eabc9..e36e068 100644
--- a/tests/ss7/ss7_test.c
+++ b/tests/ss7/ss7_test.c
@@ -235,6 +235,7 @@ static void test_as(void)
OSMO_ASSERT(osmo_ss7_as_find_by_name(s7i, "as1") == NULL);
as = osmo_ss7_as_find_or_create(s7i, "as1", OSMO_SS7_ASP_PROT_M3UA);
+ OSMO_ASSERT(as);
OSMO_ASSERT(osmo_ss7_as_find_by_name(s7i, "as1") == as);
OSMO_ASSERT(osmo_ss7_as_find_by_rctx(s7i, 2342) == NULL);
as->cfg.routing_key.context = 2342;