mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
UBIFS: fix memory leak on error path
UBIFS leaks memory on error path in 'mount_ubifs()'. In case of failure in
'ubifs_fixup_free_space()', it does not call 'ubifs_lpt_free()' whereas LPT
data structures can potentially be allocated. The amount of memory leaked can
be quite high -- see 'ubifs_lpt_init()'.
The bug was introduced when moving the LPT initialisation earlier in the
mount process (commit '781c5717a9').
Signed-off-by: Sidney Amani <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
This commit is contained in:
parent
4994297606
commit
56b04e3e8b
1 changed files with 1 additions and 1 deletions
|
|
@ -1301,7 +1301,7 @@ static int mount_ubifs(struct ubifs_info *c)
|
|||
if (!c->ro_mount && c->space_fixup) {
|
||||
err = ubifs_fixup_free_space(c);
|
||||
if (err)
|
||||
goto out_master;
|
||||
goto out_lpt;
|
||||
}
|
||||
|
||||
if (!c->ro_mount) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue