From: Adrian Bunk Date: Mon, 3 Mar 2008 18:07:52 +0000 (+0200) Subject: UBI: mtd/ubi/vtbl.c: fix memory leak X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=f7f0283776b6fe33f87f6a2ef15b1feb49ef6dac;p=deliverable%2Flinux.git 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 Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 56fc3fbce838..af36b12be278 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; }