
20 Jan
2021
20 Jan
'21
3:04 p.m.
Don't start/stop an stdio device that might have been already freed.
Signed-off-by: Nicolas Saenz Julienne nsaenzjulienne@suse.de Fixes: 70c2525c0d3c ("IOMUX: Stop dropped consoles") --- common/console.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/common/console.c b/common/console.c index f3cc45cab5..5c6b74b351 100644 --- a/common/console.c +++ b/common/console.c @@ -252,6 +252,9 @@ static bool console_needs_start_stop(int file, struct stdio_dev *sdev) { int i, j;
+ if (!stdio_valid(sdev)) + return false; + for (i = 0; i < ARRAY_SIZE(cd_count); i++) { if (i == file) continue;
--
2.30.0