From 02a761e98629415bff0963fb4a8f1bc7f8a49fc0 Mon Sep 17 00:00:00 2001 From: Sravan Kumar Kairam Date: Fri, 5 Jul 2019 17:06:27 +0530 Subject: [PATCH] qcacld-3.0: Fix possible null pointer dereference Fix possible null pointer deference in wlan_ipa_uc_ol_init when accessing passed osdev argument. Change-Id: I98b2679b7e73041315c4ccc2858eff79fbbcf026 CRs-Fixed: 2484996 --- components/ipa/core/src/wlan_ipa_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index 60c96c54b057..e754198cee9a 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -3117,6 +3117,12 @@ QDF_STATUS wlan_ipa_uc_ol_init(struct wlan_ipa_priv *ipa_ctx, ipa_debug("enter"); + if (!osdev) { + ipa_err("osdev null"); + status = QDF_STATUS_E_FAILURE; + goto fail_return; + } + for (i = 0; i < WLAN_IPA_MAX_SESSION; i++) { ipa_ctx->vdev_to_iface[i] = WLAN_IPA_MAX_SESSION; ipa_ctx->vdev_offload_enabled[i] = false;