mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
iwlwifi: mvm: Fix possible NULL pointer dereference
iwl_mvm_te_clear_data() is called for cleanup in case sending the HOT_SPOT_CMD failed. However, in case sending the command caused a fw error and restart (e.g. if the command is not supported) then the te_data pointer may no longer be valid, which leads to a NULL pointer dereference. Fix it by checking that the te_data pointer is not NULL before dereferencing it. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
4c816b2132
commit
cee859fe9a
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ void iwl_mvm_te_clear_data(struct iwl_mvm *mvm,
|
|||
{
|
||||
lockdep_assert_held(&mvm->time_event_lock);
|
||||
|
||||
if (!te_data->vif)
|
||||
if (!te_data || !te_data->vif)
|
||||
return;
|
||||
|
||||
list_del(&te_data->list);
|
||||
|
|
|
|||
Loading…
Reference in a new issue