hnbgw_cn.c: Guard against null ss7 ptr during init
Fixes: Coverity CID#272989 Change-Id: Ic787d52a3c2e73ac272735a33b20bb94e29fad95
This commit is contained in:
parent
44dfe698fa
commit
7eb89ec9fe
|
@ -541,6 +541,8 @@ int hnbgw_cnlink_init(struct hnb_gw *gw, const char *stp_host, uint16_t stp_port
|
||||||
LOGP(DRANAP, LOGL_NOTICE, "No cs7 instance configured for IuCS nor IuPS,"
|
LOGP(DRANAP, LOGL_NOTICE, "No cs7 instance configured for IuCS nor IuPS,"
|
||||||
" creating default instance\n");
|
" creating default instance\n");
|
||||||
ss7 = osmo_ss7_instance_find_or_create(gw, 0);
|
ss7 = osmo_ss7_instance_find_or_create(gw, 0);
|
||||||
|
if (!ss7)
|
||||||
|
return -1;
|
||||||
ss7->cfg.primary_pc = (23 << 3) + 5;
|
ss7->cfg.primary_pc = (23 << 3) + 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue