gtp: cb_delete_context(): Clarify why pdp->lib is set to NULL
Change-Id: I02c46062d6dc9802d9cae057587e66a68a65436c
diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index 88b8d04..79d5543 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -649,8 +649,9 @@
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);