[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120625171738.GC16275@sortiz-mobl>
Date: Mon, 25 Jun 2012 19:17:38 +0200
From: Samuel Ortiz <sameo@...ux.intel.com>
To: Sasha Levin <levinsasha928@...il.com>
Cc: lauro.venancio@...nbossa.org, aloisio.almeida@...nbossa.org,
linville@...driver.com, davej@...hat.com,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NFC: only put local on destruction if it was created
before
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@...il.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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists