]> git.karo-electronics.de Git - karo-tx-linux.git/commit
UBIFS: fix a rare memory leak in ro to rw remounting path
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 6 May 2011 14:08:56 +0000 (17:08 +0300)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 May 2012 15:20:37 +0000 (11:20 -0400)
commit12484758f50f235fc6cd7469139503dbc89faa46
tree4aff1837f0fcde0fa8bcb9e6f67507635078bdf2
parent6e018cc8eb066bb2f315663e81631bd015d3f51e
UBIFS: fix a rare memory leak in ro to rw remounting path

commit eaeee242c531cd4b0a4a46e8b5dd7ef504380c42 upstream.

When re-mounting from R/O mode to R/W mode and the LEB count in the superblock
is not up-to date, because for the underlying UBI volume became larger, we
re-write the superblock. We allocate RAM for these purposes, but never free it.
So this is a memory leak, although very rare one.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/ubifs/sb.c
fs/ubifs/super.c