Commit 513a2396 authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville

iwmc3200wifi: fix NULL pointer dereference in iwm_if_free

The driver private data is now based on wiphy. So we should not
touch the private data after wiphy_free() is called. The patch
fixes the potential NULL pointer dereference by making the
iwm_wdev_free() the last one on the interface removal path.
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1b0d9224
......@@ -151,8 +151,8 @@ void iwm_if_free(struct iwm_priv *iwm)
return;
free_netdev(iwm_to_ndev(iwm));
iwm_wdev_free(iwm);
iwm_priv_deinit(iwm);
iwm_wdev_free(iwm);
}
int iwm_if_add(struct iwm_priv *iwm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment