UBI: fix memory leak
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 4 Jun 2008 13:48:12 +0000 (16:48 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 25 May 2009 14:08:39 +0000 (17:08 +0300)
commit8be74cfb133d794d43ef1288b3288fa1f9e3435b
tree6ee2e804a0af27422c8a8f61e0db888a4569d982
parent66a8c7cc56ee69ff20cf3ac3382420a7f5d1801c
UBI: fix memory leak

ubi_free_volume() function sets ubi->volumes[] to NULL, so
ubi_eba_close() is useless, it does not free what has to be freed.
So zap it and free vol->eba_tbl at the volume release function.

Pointed-out-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/build.c
drivers/mtd/ubi/eba.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/vmt.c