gb_proxy_peer: fix NULL pointer dereference in gbproxy_sgsn_alloc()

LOGPSGSN_CAT() dereferences sgsn->nse in order to get NSEI.

Change-Id: I1c592dd6f0da5f167290f38de3b30a1a04c4313d
Fixes: CID#215868
This commit is contained in:
Vadim Yanitskiy 2021-01-05 14:42:46 +01:00
parent 4dba67a66f
commit 6964e88948
1 changed files with 2 additions and 1 deletions

View File

@ -364,7 +364,8 @@ struct gbproxy_sgsn *gbproxy_sgsn_alloc(struct gbproxy_config *cfg, uint16_t nse
sgsn->nse = gbproxy_nse_alloc(cfg, nsei, true);
if (!sgsn->nse) {
LOGPSGSN_CAT(sgsn, DOBJ, LOGL_INFO, "Could not allocate NSE(%05u) for SGSN\n", nsei);
LOGP(DOBJ, LOGL_ERROR, "Could not allocate NSE(%05u) for SGSN(%s)\n",
nsei, sgsn->name);
goto free_sgsn;
}