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
Dieser Commit ist enthalten in:
Krunal Soni
2017-10-20 11:37:43 -07:00
committet von snandini
Ursprung 136dd82676
Commit 80898349e8
2 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen

Datei anzeigen

@@ -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

Datei anzeigen

@@ -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);