[PATCH] shared/gap: Fix memory leak in gap

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

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

Allocated irk memory was never assigned.
---
 src/shared/gap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/gap.c b/src/shared/gap.c
index 19059e8..3536c1c 100644
--- a/src/shared/gap.c
+++ b/src/shared/gap.c
@@ -276,5 +276,5 @@ bool bt_gap_add_peer_irk(struct bt_gap *gap, uint8_t addr_type,
 	memcpy(irk->addr, addr, 6);
 	memcpy(irk->key, key, 16);
 
-	return true;
+	return queue_push_tail(gap->irk_list, irk);
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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