From d8037bcedc17ea5fc51716f43bede0c2271000a1 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 29 Aug 2019 14:24:23 +0200 Subject: gtp: cb_delete_context(): Clarify why pdp->lib is set to NULL Change-Id: I02c46062d6dc9802d9cae057587e66a68a65436c --- src/gprs/sgsn_libgtp.c | 5 +++-- 1 file 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); -- cgit v1.2.3