[PATCH 3/7] UBI: Fastmap: Fix memory leak in error path
Richard Weinberger
richard at nod.at
Mon Jul 9 08:18:39 EDT 2012
Signed-off-by: Richard Weinberger <richard at nod.at>
---
drivers/mtd/ubi/attach.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index 02505ff..5d61ba7 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -1448,7 +1448,7 @@ int ubi_attach(struct ubi_device *ubi, int force_scan)
err = scan_all(ubi, scan_ai, 0);
if (err) {
- kfree(scan_ai);
+ destroy_ai(scan_ai);
goto out_wl;
}
--
1.7.6.5
More information about the linux-mtd
mailing list