Return-path: Received: from casper.infradead.org ([85.118.1.10]:42151 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753516Ab0BILzx (ORCPT ); Tue, 9 Feb 2010 06:55:53 -0500 Subject: Re: [PATCH] iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table() From: Samuel Ortiz Reply-To: Samuel Ortiz To: Roel Kluin Cc: Samuel Ortiz , Zhu Yi , Intel Linux Wireless , linux-wireless@vger.kernel.org, Andrew Morton , LKML In-Reply-To: <4B7141FD.7050605@gmail.com> References: <4B7141FD.7050605@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 09 Feb 2010 12:55:45 +0100 Message-ID: <1265716545.2236.4.camel@caravaggio> Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Tue, 2010-02-09 at 12:07 +0100, Roel Kluin wrote: > The wrong pointer was tested. > > Signed-off-by: Roel Kluin Acked-by: Samuel Ortiz > --- > drivers/net/wireless/iwmc3200wifi/rx.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c > index 6d6ed74..f727b4a 100644 > --- a/drivers/net/wireless/iwmc3200wifi/rx.c > +++ b/drivers/net/wireless/iwmc3200wifi/rx.c > @@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf, > } > > bss->bss = kzalloc(bss_len, GFP_KERNEL); > - if (!bss) { > + if (!bss->bss) { > kfree(bss); > IWM_ERR(iwm, "Couldn't allocate bss\n"); > return -ENOMEM; > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html