[PATCH BlueZ v2 4/4] mesh: Destroy PB-ADV queue when provisioning done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 mesh/pb-adv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mesh/pb-adv.c b/mesh/pb-adv.c
index 291d92651..c1316ed1b 100644
--- a/mesh/pb-adv.c
+++ b/mesh/pb-adv.c
@@ -560,4 +560,9 @@ void pb_adv_unreg(void *user_data)
 	send_close_ind(session, 0);
 	l_queue_remove(pb_sessions, session);
 	l_free(session);
+
+	if (!l_queue_length(pb_sessions)) {
+		l_queue_destroy(pb_sessions, l_free);
+		pb_sessions = NULL;
+	}
 }
-- 
2.25.4




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux