aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-03-03 20:07:52 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-03-04 11:03:09 +0200
commitf7f0283776b6fe33f87f6a2ef15b1feb49ef6dac (patch)
treee2328ff5d42741519a03290e5c8f74c966c991b9 /drivers/mtd/ubi
parent8eee9f100b1cc3d1b0a701a8626c54422af3c987 (diff)
downloadkernel_samsung_aries-f7f0283776b6fe33f87f6a2ef15b1feb49ef6dac.zip
kernel_samsung_aries-f7f0283776b6fe33f87f6a2ef15b1feb49ef6dac.tar.gz
kernel_samsung_aries-f7f0283776b6fe33f87f6a2ef15b1feb49ef6dac.tar.bz2
UBI: mtd/ubi/vtbl.c: fix memory leak
This patch fixes a memory leak introduced by commit 4ccf8cffa963c7b5bdc6d455ea9417084ee49aa8 and spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/vtbl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 56fc3fb..af36b12 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -519,6 +519,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
if (ubi->autoresize_vol_id != -1) {
ubi_err("more then one auto-resize volume (%d "
"and %d)", ubi->autoresize_vol_id, i);
+ kfree(vol);
return -EINVAL;
}