All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix invalid read after list concatenation
@ 2011-02-03 18:43 Bruna Moreira
  2011-02-04  4:55 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Bruna Moreira @ 2011-02-03 18:43 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Bruna Moreira

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix invalid read after list concatenation
  2011-02-03 18:43 [PATCH] Fix invalid read after list concatenation Bruna Moreira
@ 2011-02-04  4:55 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-02-04  4:55 UTC (permalink / raw)
  To: Bruna Moreira; +Cc: linux-bluetooth

Hi Bruna,

On Thu, Feb 03, 2011, Bruna Moreira wrote:
> 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(-)

Pushed upstream. Thanks.

Johan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-04  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 18:43 [PATCH] Fix invalid read after list concatenation Bruna Moreira
2011-02-04  4:55 ` Johan Hedberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.