diff mbox series

[BlueZ] client: Remove reference to g_steal_pointer()

Message ID 20201109192742.42207-1-inga.stotland@intel.com
State New
Headers show
Series [BlueZ] client: Remove reference to g_steal_pointer() | expand

Commit Message

Inga Stotland Nov. 9, 2020, 7:27 p.m. UTC
In order to avoid requiring higher version of GLib, replace
g_steal_pointer() with explicitly setting the pointer value
to NULL.
---
 client/adv_monitor.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/client/adv_monitor.c b/client/adv_monitor.c
index 90ab0be09..8e81857af 100644
--- a/client/adv_monitor.c
+++ b/client/adv_monitor.c
@@ -254,10 +254,16 @@  void adv_monitor_add_manager(DBusConnection *conn, GDBusProxy *proxy)
 
 void adv_monitor_remove_manager(DBusConnection *conn)
 {
-	if (manager.supported_types != NULL)
-		g_slist_free(g_steal_pointer(&(manager.supported_types)));
-	if (manager.supported_features != NULL)
-		g_slist_free(g_steal_pointer(&(manager.supported_features)));
+	if (manager.supported_types != NULL) {
+		g_slist_free(manager.supported_types);
+		manager.supported_types = NULL;
+	}
+
+	if (manager.supported_features != NULL) {
+		g_slist_free(manager.supported_features);
+		manager.supported_features = NULL;
+	}
+
 	manager.proxy = NULL;
 	manager.app_registered = FALSE;
 }