[PATCH v2 01/10] devfs: partitioning: add missing free in error path
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Thu Feb 27 15:39:01 EST 2014
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
fs/devfs-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index 44f0169e6324..5a120c64879a 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -292,6 +292,7 @@ struct cdev *devfs_add_partition(const char *devname, loff_t offset, loff_t size
new->mtd = mtd_add_partition(cdev->mtd, offset, size, flags, name);
if (IS_ERR(new->mtd)) {
int ret = PTR_ERR(new->mtd);
+ free(new->partname);
free(new);
return ERR_PTR(ret);
}
--
1.8.5.3
More information about the barebox
mailing list