Skip to content
Commit b0daf15d authored by Boris Brezillon's avatar Boris Brezillon Committed by Zefan Li
Browse files

mtd: mtdpart: fix add_mtd_partitions error path

commit e5bae867

 upstream.

If we fail to allocate a partition structure in the middle of the partition
creation process, the already allocated partitions are never removed, which
means they are still present in the partition list and their resources are
never freed.

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
parent e9bceb03
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment