diff options
author | Sidney Amani <seed95@gmail.com> | 2012-05-18 14:32:37 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-23 13:04:02 +0300 |
commit | 1c649b478a03ac44d55ba1b1609bacb5cbd49cf1 (patch) | |
tree | 06741e7f84fcac37f2952349386e4b330361925c /fs | |
parent | c19428ec620d8b1243c45fc1728a7abadb37ddb7 (diff) |
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 '781c5717a95a74b294beb38b8276943b0f8b5bb4').
Signed-off-by: Sidney Amani <seed95@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ubifs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 3c490a57b41b..edcc9b85ed0b 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1302,7 +1302,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) { |