From 96b013c38abfb7260a2868ea7c8effc7aeefab60 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Mon, 1 May 2023 22:05:27 +0200 Subject: [PATCH] Possible fix for iwd crash --- os_dep/linux/ioctl_cfg80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 4a11178..2e08234 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -2810,6 +2810,8 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(_adapter *padapter, char *buf, in RTW_INFO("%s, ielen=%d\n", __func__, len); #endif + if (!pmlmepriv) + return -EINVAL; if (len > 0) { wps_ie = rtw_get_wps_ie(buf, len, NULL, &wps_ielen); if (wps_ie) {