aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcommon-cs/common_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcommon-cs/common_cs.c')
-rw-r--r--src/libcommon-cs/common_cs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index 8e19bb2b8..99206c86c 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -68,6 +68,10 @@ struct gsm_network *gsm_network_init(void *ctx,
/* init statistics */
net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0);
+ if (!net->msc_ctrs) {
+ talloc_free(net);
+ return NULL;
+ }
net->active_calls = osmo_counter_alloc("msc.active_calls");
net->mncc_recv = mncc_recv;