[PATCH] Fix invalid read after list concatenation

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

 



g_slist_concat uses the items from second list directly so they should
not be freed.
---
 attrib/gatt.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/attrib/gatt.c b/attrib/gatt.c
index f3b513e..20bb96f 100644
--- a/attrib/gatt.c
+++ b/attrib/gatt.c
@@ -121,7 +121,6 @@ static void primary_by_uuid_cb(guint8 status, const guint8 *ipdu,
 	dp->primaries = g_slist_concat(dp->primaries, ranges);
 
 	last = g_slist_last(ranges);
-	g_slist_free(ranges);
 	range = last->data;
 
 	if (range->end == 0xffff)
-- 
1.7.0.4

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