qcacmn: Add sanity check to avoid NULL pointer dereference

Propagation from qcacld-2.0 to qcacmn.

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
This commit is contained in:
Himanshu Agarwal
2016-09-02 21:05:01 +05:30
committed by qcabuildsw
parent af9db8b8f7
commit 8d0cdea5b4

View File

@@ -1808,8 +1808,10 @@ void hif_send_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
return;
/* Indicate the completion to higher
* layer to free the buffer */
hif_state->msg_callbacks_current.
txCompletionHandler(hif_state->
if (hif_state->msg_callbacks_current.
txCompletionHandler)
hif_state->msg_callbacks_current.
txCompletionHandler(hif_state->
msg_callbacks_current.Context,
netbuf, id, toeplitz_hash_result);
}