aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-29 14:24:23 +0200
committerlaforge <laforge@gnumonks.org>2019-08-30 08:24:48 +0000
commitd8037bcedc17ea5fc51716f43bede0c2271000a1 (patch)
tree345f26b7be167bf2547159fe0464a6b4244560c2
parentaa89f5dffced73ee9e7267739193771e6d143b89 (diff)
gtp: cb_delete_context(): Clarify why pdp->lib is set to NULL
-rw-r--r--src/gprs/sgsn_libgtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index 88b8d048a..79d5543f2 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -649,8 +649,9 @@ static int cb_delete_context(struct pdp_t *pdp)
LOGPDPX(DGPRS, LOGL_INFO, pdp, "Context %p was deleted\n", pdp);
- /* unlink the now non-existing library handle from the pdp
- * context */
+ /* unlink the now non-existing library handle from the pdp context.
+ This way we avoid calling pdp_freepdp() on it, since after returning
+ from cb_delete_context callback, libgtp is already doing so. */
pctx->lib = NULL;
sgsn_ggsn_ctx_drop_pdp(pctx);