From 17927de2ad892aa5802d118ab71f041db0732f53 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 27 Apr 2017 10:29:13 +0200 Subject: ss7_test: Avoid possible NULL pointer dereference in test case Change-Id: If2a7b2c988d06e8bbd2a63f3a5ceeb403bfb34ed Fixes: coverity CID#166992 --- tests/ss7/ss7_test.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3