diff mbox series

[1/4] wispr: Add DBG statement to 'free_connman_wispr_portal_context'.

Message ID C3AD82DD-7F27-4B0E-83CA-2E1F1E17A23D@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series wispr: Address reference counting heap-use-after-free | expand

Commit Message

Grant Erickson Nov. 10, 2023, 4:45 a.m. UTC
This adds a ‘DBG' statement to 'free_connman_wispr_portal_context' to
aid in debugging WISPr/portal reference counting errors and
correlating WISPr online checks in flight in a multi-technology
environment with "EnableOnlineToReadyTransition" asserted.
---
 src/wispr.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/src/wispr.c b/src/wispr.c
index 57e74a83..5f60bed7 100644
--- a/src/wispr.c
+++ b/src/wispr.c
@@ -164,6 +164,13 @@  static void free_wispr_routes(struct connman_wispr_portal_context *wp_context)
 static void free_connman_wispr_portal_context(
 		struct connman_wispr_portal_context *wp_context)
 {
+	DBG("wispr/portal context %p service %p (%s) type %d (%s)",
+		wp_context,
+		wp_context->service,
+		connman_service_get_identifier(wp_context->service),
+		wp_context->type,
+		__connman_ipconfig_type2string(wp_context->type));
+
 	if (wp_context->wispr_portal) {
 		if (wp_context->wispr_portal->ipv4_context == wp_context)
 			wp_context->wispr_portal->ipv4_context = NULL;