vlr: auth_fsm_start: check return value of fsm alloc

Fixes: coverity CID#178663
Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605
This commit is contained in:
Neels Hofmeyr 2017-11-07 13:23:13 +01:00 committed by Harald Welte
parent 48ba1be752
commit c698ab9a82
1 changed files with 4 additions and 1 deletions

View File

@ -583,7 +583,10 @@ struct osmo_fsm_inst *auth_fsm_start(struct vlr_subscr *vsub,
fi = osmo_fsm_inst_alloc_child(&vlr_auth_fsm, parent,
parent_term_event);
if (!fi) {
osmo_fsm_inst_dispatch(parent, parent_term_event, 0);
return NULL;
}
afp = talloc_zero(fi, struct auth_fsm_priv);
if (!afp) {