提交 ebddd63b 编写于 作者: A Artem Bityutskiy

UBI: fix memory leak in update path

When truncating an UBI volume, UBI should allocates a PEB-sized
buffer but does not release it, which leads to memory leaks.
This patch fixes the issue.
Reported-by: NMarek Skuczynski <mareksk7@gmail.com>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tested-by: NMarek Skuczynski <mareksk7@gmail.com>
Cc: stable@kernel.org
上级 b531b55a
......@@ -155,6 +155,7 @@ int ubi_start_update(struct ubi_device *ubi, struct ubi_volume *vol,
if (err)
return err;
vol->updating = 0;
return 0;
}
vol->upd_buf = vmalloc(ubi->leb_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册