fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/18558 )


Change subject: bsc_subscr_find_or_create_by_{imsi,tmsi}(): fix NULL pointer 
dereference
......................................................................

bsc_subscr_find_or_create_by_{imsi,tmsi}(): fix NULL pointer dereference

Change-Id: Icb89d566b51031c2296be0888f8b7e554aa50418
---
M src/osmo-bsc/bsc_subscriber.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/58/18558/1

diff --git a/src/osmo-bsc/bsc_subscriber.c b/src/osmo-bsc/bsc_subscriber.c
index 2541883..38b532a 100644
--- a/src/osmo-bsc/bsc_subscriber.c
+++ b/src/osmo-bsc/bsc_subscriber.c
@@ -90,6 +90,8 @@
        if (bsub)
                return bsub;
        bsub = bsc_subscr_alloc(list);
+       if (!bsub)
+               return NULL;
        bsc_subscr_set_imsi(bsub, imsi);
        return bsc_subscr_get(bsub);
 }
@@ -102,6 +104,8 @@
        if (bsub)
                return bsub;
        bsub = bsc_subscr_alloc(list);
+       if (!bsub)
+               return NULL;
        bsub->tmsi = tmsi;
        return bsc_subscr_get(bsub);
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18558
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icb89d566b51031c2296be0888f8b7e554aa50418
Gerrit-Change-Number: 18558
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to