Skip to content

Commit

Permalink
iwmc3200wifi: fix NULL pointer dereference in iwm_if_free
Browse files Browse the repository at this point in the history
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: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Zhu Yi authored and John W. Linville committed Jul 21, 2009
1 parent 1b0d922 commit 513a239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwmc3200wifi/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 513a239

Please sign in to comment.