[MERGED] osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Nov 12 14:20:06 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: vlr: auth_fsm_start: check return value of fsm alloc
......................................................................


vlr: auth_fsm_start: check return value of fsm alloc

Fixes: coverity CID#178663
Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605
---
M src/libvlr/vlr_auth_fsm.c
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c
index f07e60f..1376c82 100644
--- a/src/libvlr/vlr_auth_fsm.c
+++ b/src/libvlr/vlr_auth_fsm.c
@@ -583,7 +583,10 @@
 
 	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) {

-- 
To view, visit https://gerrit.osmocom.org/4714
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list