qcacmn: Fix null pointer dereference, wlan_cp_stats_psoc_obj_create_handler

In wlan_cp_stats_psoc_obj_create_handler() multiple error paths
lead to label wlan_cp_stats_psoc_obj_create_handler_return.

In the label, posc_cs is not null checked before passing to the
csc->cp_stats_psoc_obj_deinit() causing NULL pointer dereference.

Change-Id: I82a48cee7d2734a96960aeedff42fc4cdf94bf9c
CRs-Fixed: 2336830
这个提交包含在:
Harprit Chhabada
2018-10-23 16:31:51 -07:00
提交者 nshrivas
父节点 77d877285a
当前提交 38d7f92a30

查看文件

@@ -96,7 +96,7 @@ wlan_cp_stats_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
wlan_cp_stats_psoc_obj_create_handler_return:
if (QDF_IS_STATUS_ERROR(status)) {
if (csc) {
if (csc->cp_stats_psoc_obj_deinit)
if (csc->cp_stats_psoc_obj_deinit && psoc_cs)
csc->cp_stats_psoc_obj_deinit(psoc_cs);
if (csc->psoc_cs) {