mesh: Fix memory leak on provisioning timeout
authorBrian Gix <brian.gix@intel.com>
Tue, 21 Jul 2020 19:44:38 +0000 (12:44 -0700)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 28 Dec 2020 06:20:04 +0000 (11:50 +0530)
If the Provision Acceptor times out without completing successfully, the
timer it was using was never freed.

Change-Id: I9ca97162dd8b9951568615d99f1f150752497952
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
mesh/prov-acceptor.c

index 5231616..96f7e15 100644 (file)
@@ -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) {