Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 1/2] Fix possible invalid read/free on manager.c
Date: Thu, 14 Jul 2011 20:18:11 +0300	[thread overview]
Message-ID: <20110714171811.GA32109@dell.ger.corp.intel.com> (raw)
In-Reply-To: <1310624928-17720-1-git-send-email-luiz.dentz@gmail.com>

Hi Luiz,

On Thu, Jul 14, 2011, Luiz Augusto von Dentz wrote:
> +static void remove_adapter(void *data)
> +{
> +	struct btd_adapter *adapter = data;
> +
> +	adapter_remove(adapter);
> +	btd_adapter_unref(adapter);
> +}

The only places that call this function don't anymore use generic
pointers so it can actually have struct btd_adapter instead of void.
However, since this function is getting so simple I think it'd be more
transparent if you just did these calls in the two places where it's
necessary and don't have this extra helper function at all.

Johan

  parent reply	other threads:[~2011-07-14 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14  6:28 [PATCH BlueZ 1/2] Fix possible invalid read/free on manager.c Luiz Augusto von Dentz
2011-07-14  6:28 ` [PATCH BlueZ 2/2] Fix possible invalid read/free on media.c Luiz Augusto von Dentz
2011-07-14 17:18 ` Johan Hedberg [this message]
2011-07-14 17:45 ` [PATCH BlueZ 1/2] Fix possible invalid read/free on manager.c Dmitriy Paliy

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=20110714171811.GA32109@dell.ger.corp.intel.com \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox