From: Samuel Ortiz <sameo@linux.intel.com>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: lauro.venancio@openbossa.org, aloisio.almeida@openbossa.org,
linville@tuxdriver.com, davej@redhat.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NFC: only put local on destruction if it was created before
Date: Mon, 25 Jun 2012 19:17:38 +0200 [thread overview]
Message-ID: <20120625171738.GC16275@sortiz-mobl> (raw)
In-Reply-To: <1339531699-7377-1-git-send-email-levinsasha928@gmail.com>
Hi Sasha,
On Tue, Jun 12, 2012 at 10:08:19PM +0200, Sasha Levin wrote:
> Not having 'local' is a valid case when a socket was created but never
> bound or connected to anything, so avoid putting 'local' if it was
> never created.
>
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> ---
> net/nfc/llcp/sock.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c
> index 2c0b317..54daa10 100644
> --- a/net/nfc/llcp/sock.c
> +++ b/net/nfc/llcp/sock.c
> @@ -710,7 +710,8 @@ void nfc_llcp_sock_free(struct nfc_llcp_sock *sock)
>
> sock->parent = NULL;
>
> - nfc_llcp_local_put(sock->local);
> + if (sock->local)
> + nfc_llcp_local_put(sock->local);
nfc_llcp_local_put() already checks for its argument being NULL or not.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
next prev parent reply other threads:[~2012-06-25 17:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-12 20:08 [PATCH] NFC: only put local on destruction if it was created before Sasha Levin
2012-06-25 17:17 ` Samuel Ortiz [this message]
2012-06-25 17:15 ` Sasha Levin
2012-06-25 17:29 ` Samuel Ortiz
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=20120625171738.GC16275@sortiz-mobl \
--to=sameo@linux.intel.com \
--cc=aloisio.almeida@openbossa.org \
--cc=davej@redhat.com \
--cc=lauro.venancio@openbossa.org \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).