commit | 88274b6c431f48d44743fe4d007068bec63505ff | [log] [tgz] |
---|---|---|
author | Hans de Goede <hdegoede@redhat.com> | Wed Sep 24 14:06:09 2014 +0200 |
committer | Marek Vasut <marex@denx.de> | Tue Nov 04 06:04:00 2014 +0100 |
tree | f8cefe1c9a810b235fecf3965fe5e4d5f620c631 | |
parent | dfe5b1c86f1a79841e00c68d71d8027b223d4aa7 [diff] |
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>
diff --git a/common/stdio.c b/common/stdio.c index 68c595d..adbfc89 100644 --- a/common/stdio.c +++ b/common/stdio.c
@@ -197,6 +197,7 @@ } list_del(&(dev->list)); + free(dev); /* reassign Device list */ list_for_each(pos, &(devs.list)) {