From: Adrian Bunk Date: Mon, 3 Mar 2008 18:07:52 +0000 (+0200) Subject: UBI: mtd/ubi/vtbl.c: fix memory leak X-Git-Tag: v2.6.25-rc5~22^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7f0283776b6fe33f87f6a2ef15b1feb49ef6dac;p=linux-2.6 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 56fc3fbce8..af36b12be2 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; }