---
 src/gprs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gprs.c b/src/gprs.c
index 8f5d195..40f43e3 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -1642,6 +1642,9 @@ static void release_active_contexts(struct ofono_gprs 
*gprs)
 
                if (gc->driver->detach_shutdown != NULL)
                        gc->driver->detach_shutdown(gc, ctx->context.cid);
+
+               /* Make sure the context is properly cleared */
+               release_context(ctx);
        }
 }
 
@@ -2241,6 +2244,7 @@ static DBusMessage *gprs_remove_context(DBusConnection 
*conn,
        }
 
        DBG("Unregistering context: %s", ctx->path);
+       release_context(ctx);
        context_dbus_unregister(ctx);
        gprs->contexts = g_slist_remove(gprs->contexts, ctx);
 
-- 
1.9.1

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to