提交 88274b6c 编写于 作者: H Hans de Goede 提交者: Marek Vasut

stdio: Fix memleak on stdio_deregister

stdio_register makes a malloc-ed copy of struct stdio_dev through stdio_clone,
free the malloc-ed memory on stdio_deregister.
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
上级 dfe5b1c8
......@@ -197,6 +197,7 @@ int stdio_deregister_dev(struct stdio_dev *dev, int force)
}
list_del(&(dev->list));
free(dev);
/* reassign Device list */
list_for_each(pos, &(devs.list)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册