diff mbox series

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

Message ID 20200522211309.233824-5-brian.gix@intel.com (mailing list archive)
State Accepted
Headers show
Series mesh: Static Analysis clean-up | expand

Commit Message

Brian Gix May 22, 2020, 9:13 p.m. UTC
---
 mesh/pb-adv.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

bluez.test.bot@gmail.com May 22, 2020, 11:37 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While we are preparing for reviewing the patches, we found the following
issue/warning.

Test Result:
checkgitlint Failed

Outputs:
3: B6 Body message is missing



---
Regards,
Linux Bluetooth
diff mbox series

Patch

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;
+	}
 }