pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-gprs/+/32486 )
Change subject: sm: Fix potential null access due to missing check
......................................................................
sm: Fix potential null access due to missing check
Change-Id: I15532898f00c62cb2a63973decb401e929517cb3
---
M src/sm/sm_prim.c
1 file changed, 13 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/86/32486/1
diff --git a/src/sm/sm_prim.c b/src/sm/sm_prim.c
index 6ec8af8..c0fbca4 100644
--- a/src/sm/sm_prim.c
+++ b/src/sm/sm_prim.c
@@ -239,8 +239,10 @@
OSMO_ASSERT(ms);
} else {
sme = gprs_sm_ms_get_pdp_ctx(ms, smreg->pdp_act_req.nsapi);
- LOGSME(sme, LOGL_ERROR, "Rx SMREG-PDP-ACT.req for already existing PDP
context\n");
- return -EINVAL;
+ if (sme) {
+ LOGSME(sme, LOGL_ERROR, "Rx SMREG-PDP-ACT.req for already existing PDP
context\n");
+ return -EINVAL;
+ }
}
sme = gprs_sm_entity_alloc(ms, smreg->pdp_act_req.nsapi);
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/32486
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I15532898f00c62cb2a63973decb401e929517cb3
Gerrit-Change-Number: 32486
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange