fix uninitialized err pointer passed to osmo_bssap_le_dec()

osmo_bssap_le_dec() dereferences value of the given pointer and
checks it against NULL.  The caller must always initialize it.

Change-Id: Idb0e6565e362ce383c833d6bfec4fb39d2985a6b
Fixes: CID#272982, CID#272944
This commit is contained in:
Vadim Yanitskiy 2022-06-29 00:02:25 +07:00 committed by fixeria
parent abbb8bbbc4
commit adc3e36a3e
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ static int handle_unitdata_from_smlc(const struct osmo_sccp_addr *smlc_addr, str
{
struct osmo_ss7_instance *ss7;
struct bssap_le_pdu bssap_le;
struct osmo_bssap_le_err *err;
struct osmo_bssap_le_err *err = NULL;
struct rate_ctr_group *ctrg = bsc_gsmnet->smlc->ctrs;
ss7 = osmo_sccp_get_ss7(osmo_sccp_get_sccp(scu));

View File

@ -226,7 +226,7 @@ int lcs_loc_req_rx_bssmap_le(struct gsm_subscriber_connection *conn, struct msgb
{
struct lcs_loc_req *lcs_loc_req = conn->lcs.loc_req;
struct bssap_le_pdu bssap_le;
struct osmo_bssap_le_err *err;
struct osmo_bssap_le_err *err = NULL;
struct rate_ctr_group *ctrg = bsc_gsmnet->smlc->ctrs;
if (!lcs_loc_req) {