All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gix <brian.gix@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: inga.stotland@intel.com, brian.gix@intel.com
Subject: [PATCH BlueZ v2 4/4] mesh: Destroy PB-ADV queue when provisioning done
Date: Fri, 22 May 2020 14:13:09 -0700	[thread overview]
Message-ID: <20200522211309.233824-5-brian.gix@intel.com> (raw)
In-Reply-To: <20200522211309.233824-1-brian.gix@intel.com>

---
 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


  parent reply	other threads:[~2020-05-22 21:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22 21:13 [PATCH BlueZ v2 0/4] mesh: Static Analysis clean-up Brian Gix
2020-05-22 21:13 ` [PATCH BlueZ v2 1/4] mesh: Fix using uninitialized bytes Brian Gix
2020-05-22 21:13 ` [PATCH BlueZ v2 2/4] mesh: Fix leaked mesh_net allocation Brian Gix
2020-05-22 23:37   ` [BlueZ,v2,2/4] " bluez.test.bot
2020-05-22 21:13 ` [PATCH BlueZ v2 3/4] mesh: Fix leaked message reference Brian Gix
2020-05-22 23:37   ` [BlueZ,v2,3/4] " bluez.test.bot
2020-05-22 21:13 ` Brian Gix [this message]
2020-05-22 23:37   ` [BlueZ,v2,4/4] mesh: Destroy PB-ADV queue when provisioning done bluez.test.bot
2020-05-25 14:15 ` [PATCH BlueZ v2 0/4] mesh: Static Analysis clean-up Gix, Brian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200522211309.233824-5-brian.gix@intel.com \
    --to=brian.gix@intel.com \
    --cc=inga.stotland@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.