qcacld-3.0: Fix possible NULL pointer dereference
Pointers returned by wlan_ipa_get_iface API and cds_get_context API are not NULL validated at few places. Add NULL checks for these pointers to avoid possible NULL pointer dereference. Change-Id: I44f226c2ce97afd6ad2ff9cde5cd70d9d12bc3d2 CRs-Fixed: 2775197
This commit is contained in:

committed by
snandini

parent
0358fd452a
commit
843e288336
@@ -965,7 +965,6 @@ QDF_STATUS wlan_ipa_uc_op_metering(struct wlan_ipa_priv *ipa_ctx,
|
||||
struct ipa_uc_quota_rsp *uc_quota_rsp;
|
||||
struct ipa_uc_quota_ind *uc_quota_ind;
|
||||
struct wlan_ipa_iface_context *iface_ctx;
|
||||
uint32_t ifindex;
|
||||
uint64_t quota_bytes;
|
||||
|
||||
if (msg->op_code == WLAN_IPA_UC_OPCODE_SHARING_STATS) {
|
||||
@@ -996,11 +995,11 @@ QDF_STATUS wlan_ipa_uc_op_metering(struct wlan_ipa_priv *ipa_ctx,
|
||||
|
||||
/* send quota exceeded indication to IPA */
|
||||
iface_ctx = wlan_ipa_get_iface(ipa_ctx, QDF_STA_MODE);
|
||||
ifindex = iface_ctx->dev->ifindex;
|
||||
quota_bytes = uc_quota_ind->quota_bytes;
|
||||
if (iface_ctx)
|
||||
qdf_ipa_broadcast_wdi_quota_reach_ind(ifindex,
|
||||
quota_bytes);
|
||||
qdf_ipa_broadcast_wdi_quota_reach_ind(
|
||||
iface_ctx->dev->ifindex,
|
||||
quota_bytes);
|
||||
else
|
||||
ipa_err("Failed quota_reach_ind: NULL interface");
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user