diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-11-06 03:16:49 +0900 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-11-06 03:16:49 +0900 |
commit | bd228244da492df768f6c8d2a0032846f1dde4fa (patch) | |
tree | 626133dc66cca49097bc88fddd0236c71199696a | |
parent | a06120de77da41ee86f3704d815ff0b852246ada (diff) |
gtp: Explicit OSMO_ASSERT to ensure pdp variable is set
Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050
Fixes: Coverity CID#174335
-rw-r--r-- | gtp/gtp.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |