All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Alex Deymo <deymo@chromium.org>
Cc: linux-bluetooth@vger.kernel.org, keybuk@chromium.org
Subject: Re: [PATCH v2] core: Fix a double free on adapter_stop
Date: Tue, 2 Apr 2013 09:45:43 +0300	[thread overview]
Message-ID: <20130402064543.GA3509@x220> (raw)
In-Reply-To: <1364840044-3577-1-git-send-email-deymo@chromium.org>

Hi Alex,

On Mon, Apr 01, 2013, Alex Deymo wrote:
> The discovery_list list has the list of current discovery clients and is
> removed on adapter_stop (for example due a "power off" command). The
> g_slist_free_full will call discovery_free on every element of the list
> and remove the nodes of the list, but discovery_destroy (called by
> discovery_free) will not only free the element, but also remove it from
> the list. This causes the list node to be freed twice, once by
> g_slist_free_full and once by g_slist_remove.
> 
> This fix calls successively discovery_destroy and lets it remove the list's
> elements one by one.
> ---
>  src/adapter.c | 20 ++++++--------------
>  1 file changed, 6 insertions(+), 14 deletions(-)

Applied (after a couple minor coding style changes). Thanks.

Johan

      reply	other threads:[~2013-04-02  6:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29 21:18 [PATCH] core: Double free on adapter_stop Alex Deymo
2013-03-30 15:55 ` Johan Hedberg
2013-04-01 18:14   ` [PATCH v2] core: Fix a double " Alex Deymo
2013-04-02  6:45     ` Johan Hedberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130402064543.GA3509@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=deymo@chromium.org \
    --cc=keybuk@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.