UBI: fix double free on error path
commit7194e6f9c083e87171ddfc8b746f05e007f58132
authorAdrian Hunter <Adrian.Hunter@nokia.com>
Fri, 24 Jul 2009 14:05:00 +0000 (24 17:05 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 24 Jul 2009 17:08:52 +0000 (24 20:08 +0300)
treedf883b3efd57a4389729989babc0ebb9739153d7
parent4be3bd7849165e7efa6b0b35a23d6a3598d97465
UBI: fix double free on error path

If we fail in 'ubi_eba_init_scan()', we free
'ubi->volumes[i]->eba_tbl' in there, but also later free it
in 'free_internal_volumes()'. Fix this by assigning NULL
to 'ubi->volumes[i]->eba_tbl' after it is freed.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/eba.c