diff mbox series

[BlueZ] mesh: Fix memory leak on provisioning timeout

Message ID 20200721194724.230809-1-brian.gix@intel.com (mailing list archive)
State Accepted
Headers show
Series [BlueZ] mesh: Fix memory leak on provisioning timeout | expand

Commit Message

Brian Gix July 21, 2020, 7:47 p.m. UTC
If the Provision Acceptor times out without completing successfully, the
timer it was using was never freed.
---
 mesh/prov-acceptor.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/mesh/prov-acceptor.c b/mesh/prov-acceptor.c
index 5231616ee..96f7e15ad 100644
--- a/mesh/prov-acceptor.c
+++ b/mesh/prov-acceptor.c
@@ -143,6 +143,7 @@  static void prov_to(struct l_timeout *timeout, void *user_data)
 	if (rx_prov != prov)
 		return;
 
+	l_timeout_remove(prov->timeout);
 	prov->timeout = NULL;
 
 	if (prov->cmplt && prov->trans_tx) {