aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_subscriber.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libbsc/bsc_subscriber.c')
-rw-r--r--openbsc/src/libbsc/bsc_subscriber.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bsc_subscriber.c b/openbsc/src/libbsc/bsc_subscriber.c
index 73e61e801..f4300d760 100644
--- a/openbsc/src/libbsc/bsc_subscriber.c
+++ b/openbsc/src/libbsc/bsc_subscriber.c
@@ -91,6 +91,8 @@ struct bsc_subscr *bsc_subscr_find_or_create_by_imsi(struct llist_head *list,
if (bsub)
return bsub;
bsub = bsc_subscr_alloc(list);
+ if (!bsub)
+ return NULL;
bsc_subscr_set_imsi(bsub, imsi);
return bsub;
}
@@ -103,6 +105,8 @@ struct bsc_subscr *bsc_subscr_find_or_create_by_tmsi(struct llist_head *list,
if (bsub)
return bsub;
bsub = bsc_subscr_alloc(list);
+ if (!bsub)
+ return NULL;
bsub->tmsi = tmsi;
return bsub;
}