]> git.baikalelectronics.ru Git - uboot.git/commit
fs/fat: fix fatbuf leak
authorRob Clark <robdclark@gmail.com>
Tue, 12 Sep 2017 20:40:01 +0000 (16:40 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 15 Sep 2017 13:03:15 +0000 (09:03 -0400)
commitd8501cf43558d36137b9c97a2540fb8ac19685ce
tree4224ac06f68e5547a64d34fbbac9e581be101ab8
parent42a7feda64a78b6bad3909b8847fc263451967ce
fs/fat: fix fatbuf leak

A new fatbuf was allocated by get_fs_info() (called by fat_itr_root()),
but not freed, resulting in eventually running out of memory.  Spotted
by running 'ls -r' in a large FAT filesystem from Shell.efi.

fatbuf is mainly used to cache FAT entry lookups (get_fatent())..
possibly once fat_write.c it can move into the iterator to simplify
this.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ɓukasz Majewski <lukma@denx.de>
fs/fat/fat.c