summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@qti.qualcomm.com>2016-08-22 14:05:01 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-08-23 11:41:34 +0530
commitcaacbde912df599d3a0ddf4df1200a932c03eeb8 (patch)
tree848f3c664a2788115cd4c67146660af9477f4413
parentd575e0624544e48ac17f9474ce9ac467b5845fad (diff)
qcacld-2.0: Add sanity check to avoid NULL pointer dereference
Add sanity check to avoid NULL pointer dereferencing of tx completion handler callback in hif_send_buffer_cleanup_on_pipe. Change-Id: If38b4b7cdd1154d8272e5150c6653f90df8f4b5e CRs-Fixed: 1057490
-rw-r--r--CORE/SERVICES/HIF/PCIe/hif_pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.c b/CORE/SERVICES/HIF/PCIe/hif_pci.c
index 498f8d6ef69f..2e1d580eb0a5 100644
--- a/CORE/SERVICES/HIF/PCIe/hif_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/hif_pci.c
@@ -1810,8 +1810,9 @@ hif_send_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
return;
}
/* Indicate the completion to higer layer to free the buffer */
- hif_state->msg_callbacks_current.txCompletionHandler(
- hif_state->msg_callbacks_current.Context, netbuf, id);
+ if (hif_state->msg_callbacks_current.txCompletionHandler)
+ hif_state->msg_callbacks_current.txCompletionHandler(
+ hif_state->msg_callbacks_current.Context, netbuf, id);
}
}
}