From: Roel Kluin Date: Tue, 9 Feb 2010 11:07:41 +0000 (+0100) Subject: iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table() X-Git-Tag: MMI-PSA29.97-13-9~24911^2~1^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33a5d083e786f0c3fb4efedb59b0e8e3de39963b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table() The wrong pointer was tested. Signed-off-by: Roel Kluin Acked-by: Samuel Ortiz Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 3db3d8b07491..64d16fe37f9a 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;