From fbf42d905ad5abf6ca2ddf23e835516ff435dfbf Mon Sep 17 00:00:00 2001 From: Rin Cat Date: Sun, 2 Aug 2020 06:21:39 -0400 Subject: [PATCH] Fix: address of array 'dvobj->padapters' will always evaluate to 'true' --- core/rtw_ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index e52b5ad..5949ad0 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -4400,7 +4400,7 @@ static u8 rtw_ap_update_chbw_by_ifbmp(struct dvobj_priv *dvobj, u8 ifbmp int i; for (i = 0; i < dvobj->iface_nums; i++) { - if (!(ifbmp & BIT(i)) || !dvobj->padapters) + if (!(ifbmp & BIT(i)) || &(dvobj->padapters) == NULL) continue; iface = dvobj->padapters[i]; @@ -4420,7 +4420,7 @@ static u8 rtw_ap_update_chbw_by_ifbmp(struct dvobj_priv *dvobj, u8 ifbmp } for (i = 0; i < dvobj->iface_nums; i++) { - if (!(ifbmp & BIT(i)) || !dvobj->padapters) + if (!(ifbmp & BIT(i)) || &(dvobj->padapters) == NULL) continue; iface = dvobj->padapters[i];