diff options
| author | Alok Kumar <alokkuma@codeaurora.org> | 2018-08-01 19:41:01 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-02-06 21:28:19 -0800 |
| commit | b79d941eaa141e8c647abf589b86f4752720e4da (patch) | |
| tree | 1f2c5b1c3a1fd8b591953c137b418bdd7647bc73 | |
| parent | 2283aa8b1ee55a0a545a1b0135d6091a123dd087 (diff) | |
qcacld-3.0: Fix check_after_deref(REVERSE_INULL) issue
In __hdd_hard_start_xmit, Null-checking for skb under drop_pkt
suggests that it may be null, but it has already been dereferenced
on all paths.
Remove this Null-check for skb under drop_pkt as skb cannot be NULL.
Change-Id: I6c8e816652951a95cff26b26c48b8f39a096b095
CRs-Fixed: 2259256
| -rw-r--r-- | core/hdd/src/wlan_hdd_tx_rx.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 597ed701f297..c86ad59a0315 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -1088,17 +1088,15 @@ drop_pkt_and_release_skb: qdf_net_buf_debug_release_skb(skb); drop_pkt: - if (skb) { - /* track connectivity stats */ - if (pAdapter->pkt_type_bitmap) - hdd_tx_rx_collect_connectivity_stats_info(skb, pAdapter, - PKT_TYPE_TX_DROPPED, &pkt_type); + /* track connectivity stats */ + if (pAdapter->pkt_type_bitmap) + hdd_tx_rx_collect_connectivity_stats_info(skb, pAdapter, + PKT_TYPE_TX_DROPPED, + &pkt_type); - qdf_dp_trace_data_pkt(skb, QDF_DP_TRACE_DROP_PACKET_RECORD, 0, - QDF_TX); - kfree_skb(skb); - skb = NULL; - } + qdf_dp_trace_data_pkt(skb, QDF_DP_TRACE_DROP_PACKET_RECORD, 0, + QDF_TX); + kfree_skb(skb); drop_pkt_accounting: |
