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)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:21:09 +0000 (12:21 -0500)
commit18993f5c92775cf1e0f30452067378f8230a821e
treeb955bae98f50161d4feea34519d98a2a02404320
parent3fc6fffd014f084c921a862875304adb5420d9ed
UBIFS: fix a rare memory leak in ro to rw remounting path

BugLink: http://bugs.launchpad.net/bugs/793702

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: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/ubifs/sb.c
fs/ubifs/super.c