Browse Source

server: Fix segfault in error path (client component ID != client)

When we terminate the FSM instance, we must immediately return.

Change-Id: I8dff45daa6584ed111a8469e7b3bf90e7c939612
changes/26/28026/1
Harald Welte 3 months ago
parent
commit
900ee725b5
  1. 2
      src/server/rspro_server.c

2
src/server/rspro_server.c

@ -138,6 +138,7 @@ static void clnt_st_established(struct osmo_fsm_inst *fi, uint32_t event, void *
if (conn->comp_id.type != ComponentType_remsimClient) {
LOGPFSML(fi, LOGL_ERROR, "ConnectClientReq from identity != Client ?!?\n");
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
return;
}
/* reparent us from srv->connections to srv->clients */
@ -180,6 +181,7 @@ static void clnt_st_established(struct osmo_fsm_inst *fi, uint32_t event, void *
if (conn->comp_id.type != ComponentType_remsimBankd) {
LOGPFSML(fi, LOGL_ERROR, "ConnectBankReq from identity != Bank ?!?\n");
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
return;
}
/* FIXME: check for unique-ness */
conn->bank.bank_id = cbreq->bankId;

Loading…
Cancel
Save