summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-04-20 20:14:01 +0200
committerHarald Welte <laforge@osmocom.org>2020-04-20 20:14:01 +0200
commitd2550da76f9974bb1957f74c5d3eb75fdae923d9 (patch)
tree8f6d6f3a27127253cafb26a5987c5f102e6321ea /openbsc/src
parent5b5b8666816e2a081dd18502fec39a04f88939c5 (diff)
fix compilation with gcc-10
See also: https://alioth-lists.debian.net/pipermail/debian-mobcom-maintainers/Week-of-Mon-20200413/000648.html Change-Id: I0e9596c3ef26231999c729b5cc408fcaca3790fc
Diffstat (limited to 'openbsc/src')
-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;
}