diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-09-24 14:06:09 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-11-04 06:04:00 +0100 |
commit | 88274b6c431f48d44743fe4d007068bec63505ff (patch) | |
tree | f8cefe1c9a810b235fecf3965fe5e4d5f620c631 /common/stdio.c | |
parent | dfe5b1c86f1a79841e00c68d71d8027b223d4aa7 (diff) | |
download | u-boot-88274b6c431f48d44743fe4d007068bec63505ff.tar.gz |
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>
Diffstat (limited to 'common/stdio.c')
-rw-r--r-- | common/stdio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/stdio.c b/common/stdio.c index 68c595d2d7..adbfc890dd 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -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)) { |