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
Esse commit está contido em:
@@ -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);
|
||||
|
Referência em uma nova issue
Block a user