iwlwifi: mvm: Fix possible NULL pointer dereference
authorAvraham Stern <avraham.stern@intel.com>
Mon, 24 Dec 2018 08:59:13 +0000 (10:59 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 14 Feb 2019 09:29:46 +0000 (11:29 +0200)
commitcee859fe9ae33d0ed3edcc018ee4cc3081907d60
treed31dd48ad072eb3359719bf32405520305b22346
parent4c816b2132aa287a1940125e7c33139710d9cf17
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>
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c