mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
wifi: nl80211: remove redundant null pointer check in coalescing
In 'cfg80211_free_coalesce', '&coalesce->rules[i]' is a pointer to VLA member of 'struct cfg80211_coalesce' and should never be NULL, so redundant check may be dropped. I think this is correct, but I haven't tested it seriously. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com> Link: https://patch.msgid.link/20241003095912.218465-1-d.kandybka@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
b0b6646a9d
commit
484bd64bdc
|
|
@ -14061,8 +14061,6 @@ void cfg80211_free_coalesce(struct cfg80211_coalesce *coalesce)
|
|||
|
||||
for (i = 0; i < coalesce->n_rules; i++) {
|
||||
rule = &coalesce->rules[i];
|
||||
if (!rule)
|
||||
continue;
|
||||
for (j = 0; j < rule->n_patterns; j++)
|
||||
kfree(rule->patterns[j].mask);
|
||||
kfree(rule->patterns);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user