UBIFS: fix a rare memory leak in ro to rw remounting path
commitb5914dec1c8ae26f4d540b40a7f8c7ea4f76fc45
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 6 May 2011 14:08:56 +0000 (6 17:08 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:24:04 +0000 (23 15:24 -0700)
treebf1432f0740bda7f531e8b3c07a0ce12845d5119
parentee4a3a8203eea2970e2347e2aaf2ba04c0116fff
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: Greg Kroah-Hartman <gregkh@suse.de>
fs/ubifs/sb.c
fs/ubifs/super.c