mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-09 18:58:18 +01:00
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: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
dfe5b1c86f
commit
88274b6c43
1 changed files with 1 additions and 0 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue