aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-11-06 03:16:49 +0900
committerHarald Welte <laforge@gnumonks.org>2017-11-06 03:16:49 +0900
commitbd228244da492df768f6c8d2a0032846f1dde4fa (patch)
tree626133dc66cca49097bc88fddd0236c71199696a
parenta06120de77da41ee86f3704d815ff0b852246ada (diff)
gtp: Explicit OSMO_ASSERT to ensure pdp variable is set
Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050 Fixes: Coverity CID#174335
-rw-r--r--gtp/gtp.c6
1 files changed, 6 insertions, 0 deletions
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 @@ int gtp_error_ind_conf(struct gsn_t *gsn, int version,
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);