From 15f6e45a5c21cb5d6b4eb337f0209bf377926804 Mon Sep 17 00:00:00 2001 From: Lihua Liu Date: Wed, 30 May 2018 17:31:06 +0800 Subject: [PATCH] qcacld-3.0: Fix potential NULL reference in wlan_ipa_uc_loaded_handler In function wlan_ipa_uc_loaded_handler,the qdf_dev is as return of wlan_psoc_get_qdf_dev(),which maybe NULL,then NULL reference could occur later. Change-Id: I3c6d5af35934deef643cb600b1966c22769c71ed CRs-Fixed: 2250977 --- components/ipa/core/src/wlan_ipa_core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index 345f14da1840..3a54833fc48b 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -2447,6 +2447,10 @@ static void wlan_ipa_uc_loaded_handler(struct wlan_ipa_priv *ipa_ctx) return; } + if (!qdf_dev) { + ipa_err("qdf_dev is null"); + return; + } /* Connect pipe */ status = wlan_ipa_wdi_setup(ipa_ctx, qdf_dev); if (status) {