mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
qcacmn: Add null pointer check in qdf_dp_trace
In hdd_tx_timeout(), null nbuf is passed to qdf_dp_trace(). This results a null pointer dereference when getting data buffer. Since data buffer is not mandory for qdf_dp_add_record(), add null nbuf check in qdf_dp_trace(). Change-Id: If5fb4753d382d8f29bdf4d934a7910a28a7c76aa CRs-Fixed: 2244543
This commit is contained in:
parent
72d455a1bd
commit
3c724258f3
1 changed files with 2 additions and 1 deletions
|
|
@ -1970,7 +1970,8 @@ void qdf_dp_trace(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
|
|||
if (qdf_dp_enable_check(nbuf, code, dir) == false)
|
||||
return;
|
||||
|
||||
qdf_dp_add_record(code, pdev_id, qdf_nbuf_data(nbuf), size, NULL, 0,
|
||||
qdf_dp_add_record(code, pdev_id, nbuf ? qdf_nbuf_data(nbuf) : NULL,
|
||||
size, NULL, 0,
|
||||
(nbuf) ? QDF_NBUF_CB_DP_TRACE_PRINT(nbuf) : false);
|
||||
}
|
||||
qdf_export_symbol(qdf_dp_trace);
|
||||
|
|
|
|||
Loading…
Reference in a new issue