mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacmn: Add NULL pointer check before dereferencing it
Few of the serialization APIs are de-referencing the pointer without checking it against NULL. Add a NULL check before de-referencing it. CRs-Fixed: 2130161 Change-Id: I109518332e593e1f32936404021db1db7a332df7
This commit is contained in:
parent
136dd82676
commit
80898349e8
2 changed files with 8 additions and 1 deletions
|
|
@ -219,6 +219,10 @@ wlan_serialization_request(struct wlan_serialization_command *cmd)
|
|||
}
|
||||
|
||||
ser_soc_obj = wlan_serialization_get_obj(cmd);
|
||||
if (!ser_soc_obj) {
|
||||
serialization_err("ser_soc_obj is invalid");
|
||||
return WLAN_SER_CMD_DENIED_UNSPECIFIED;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get Component Info callback by calling
|
||||
|
|
|
|||
|
|
@ -532,9 +532,12 @@ struct wlan_serialization_pdev_priv_obj *wlan_serialization_get_pdev_priv_obj(
|
|||
struct wlan_serialization_psoc_priv_obj *
|
||||
wlan_serialization_get_obj(struct wlan_serialization_command *cmd)
|
||||
{
|
||||
struct wlan_serialization_psoc_priv_obj *ser_soc_obj;
|
||||
struct wlan_serialization_psoc_priv_obj *ser_soc_obj = NULL;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
if (!cmd->vdev)
|
||||
return ser_soc_obj;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(cmd->vdev);
|
||||
ser_soc_obj = wlan_serialization_get_psoc_priv_obj(psoc);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue