vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()

Change-Id: I14ad41bfa1ab3455a6a175cfb05341ca12c8d73e
Fixes: CID#322299
This commit is contained in:
Vadim Yanitskiy 2023-12-12 22:42:17 +07:00
parent 5dee672e96
commit 9da6536312
1 changed files with 3 additions and 1 deletions

View File

@ -317,8 +317,10 @@ static void vgcs_call_fsm_busy(struct osmo_fsm_inst *fi, uint32_t event, void *d
break;
case VGCS_EV_MSC_DTAP:
LOG_CALL(conn, LOGL_DEBUG, "MSC sends DTAP message to talker.\n");
if (!conn->vgcs_call.talker)
if (!conn->vgcs_call.talker) {
msgb_free(data);
break;
}
rc = osmo_fsm_inst_dispatch(conn->vgcs_call.talker->vgcs_chan.fi, VGCS_EV_MSC_DTAP, data);
if (rc < 0)
msgb_free(data);