[Bluez PATCH v4 4/4] shared/mgmt: Fix memory leak in mgmt_tlv_list

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

 



This patch freed the mgmt_tlv properly in mgmt_tlv_list_free.

Reviewed-by: apusaka@xxxxxxxxxxxx
Reviewed-by: mcchou@xxxxxxxxxxxx
---

Changes in v4:
- Simply use free instead of mgmt_tlv_free

Changes in v2:
- Fix incompatible pointer type error of mgmt_tlv_free

 src/shared/mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/mgmt.c b/src/shared/mgmt.c
index dc8107846668..3e9b9ee26472 100644
--- a/src/shared/mgmt.c
+++ b/src/shared/mgmt.c
@@ -595,7 +595,7 @@ static void mgmt_tlv_free(struct mgmt_tlv *entry)
 
 void mgmt_tlv_list_free(struct mgmt_tlv_list *tlv_list)
 {
-	queue_destroy(tlv_list->tlv_queue, NULL);
+	queue_destroy(tlv_list->tlv_queue, free);
 	free(tlv_list);
 }
 
-- 
2.29.2.729.g45daf8777d-goog




[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