提交 33a5d083 编写于 作者: R Roel Kluin 提交者: John W. Linville

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

The wrong pointer was tested.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Acked-by: NSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 6c8afef5
...@@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf, ...@@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf,
} }
bss->bss = kzalloc(bss_len, GFP_KERNEL); bss->bss = kzalloc(bss_len, GFP_KERNEL);
if (!bss) { if (!bss->bss) {
kfree(bss); kfree(bss);
IWM_ERR(iwm, "Couldn't allocate bss\n"); IWM_ERR(iwm, "Couldn't allocate bss\n");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册