wifi: cfg80211: stop parsing after allocation failure
authorBenjamin Berg <benjamin.berg@intel.com>
Sun, 18 Jun 2023 18:50:00 +0000 (21:50 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Jun 2023 11:12:43 +0000 (13:12 +0200)
commit8dcc91c446687727f88997a2e177cdab740ef092
tree14acdcaa7817791c334eaf40b53bccb39bac6144
parentc870d66f1b7f51fa3401771ff6c41fd78adb869e
wifi: cfg80211: stop parsing after allocation failure

The error handling code would break out of the loop incorrectly,
causing the rest of the message to be misinterpreted. Fix this by
also jumping out of the surrounding while loop, which will trigger
the error detection code.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230618214436.0ffac98475cf.I6f5c08a09f5c9fced01497b95a9841ffd1b039f8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c