arehbein has submitted this change. (
https://gerrit.osmocom.org/c/osmo-upf/+/31971 )
Change subject: up_session: Silence coverity warning
......................................................................
up_session: Silence coverity warning
Coverity complains about a supposedly missing NULL check for the pointer 'pdr',
that check
however happens before the function in question is called.
It makes sense to be consistent inside the function, so remove the NULL check before
calling
'pdr_del', because we don't NULL check anywhere else in the function either.
Fixes: Coverity scan CID#307494
Change-Id: Ia33e4211b4a24abc87c3c2ceffe807ca3322f29d
---
M src/osmo-upf/up_session.c
1 file changed, 17 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
arehbein: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-upf/up_session.c b/src/osmo-upf/up_session.c
index 1438cce..928db0b 100644
--- a/src/osmo-upf/up_session.c
+++ b/src/osmo-upf/up_session.c
@@ -556,8 +556,7 @@
return pdr;
nack_resp:
- if (pdr)
- pdr_del(pdr);
+ pdr_del(pdr);
if (!*offending_ie_present) {
*offending_ie = OSMO_PFCP_IEI_UPD_PDR;
*offending_ie_present = true;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-upf/+/31971
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ia33e4211b4a24abc87c3c2ceffe807ca3322f29d
Gerrit-Change-Number: 31971
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged