Sfoglia il codice sorgente

iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table()

The wrong pointer was tested.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Roel Kluin 15 anni fa
parent
commit
33a5d083e7
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      drivers/net/wireless/iwmc3200wifi/rx.c

+ 1 - 1
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;