Commit 745d9f4
ubi: eba: properly rollback inside self_check_eba
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: 00abf30 ("UBI: Add self_check_eba()")
Cc: [email protected]
Signed-off-by: Fedor Pchelkin <[email protected]>
Reviewed-by: Zhihao Cheng <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>1 parent 22a40d1 commit 745d9f4
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1564 | 1564 | | |
1565 | 1565 | | |
1566 | 1566 | | |
| 1567 | + | |
1567 | 1568 | | |
1568 | 1569 | | |
1569 | 1570 | | |
| |||
1599 | 1600 | | |
1600 | 1601 | | |
1601 | 1602 | | |
1602 | | - | |
| 1603 | + | |
1603 | 1604 | | |
1604 | 1605 | | |
1605 | 1606 | | |
| |||
0 commit comments