Harald Welte has submitted this change and it was merged. Change subject: gtp: Explicit OSMO_ASSERT to ensure pdp variable is set ......................................................................
gtp: Explicit OSMO_ASSERT to ensure pdp variable is set Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050 Fixes: Coverity CID#174335 --- M gtp/gtp.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/gtp/gtp.c b/gtp/gtp.c index c798192..b36e0c6 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -2635,6 +2635,12 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Received Error Indication\n"); + /* This is obvious from above code, given the semantics of the + * functions above, but Coverity doesn't figure this out, so + * let's make it clear. It's good style anyway in case above + * code should ever change. */ + OSMO_ASSERT(pdp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); pdp_freepdp(pdp); -- To view, visit https://gerrit.osmocom.org/4691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder