Fedor Pchelkin 154d33dc8d ubi: eba: properly rollback inside self_check_eba
commit 745d9f4a31defec731119ee8aad8ba9f2536dd9a upstream.

In case of a memory allocation failure in the volumes loop we can only
process the already allocated scan_eba and fm_eba array elements on the
error path - others are still uninitialized.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 00abf3041590 ("UBI: Add self_check_eba()")
Cc: stable@vger.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-03 09:00:47 +02:00
..
2024-05-21 09:51:42 -07:00
2022-09-20 10:40:30 +02:00
2024-05-16 09:04:52 -07:00
2022-09-19 18:14:53 +02:00
2023-06-22 23:00:43 +02:00