commit | f25bbb2d29d9b71484dbd45acbccac65e3c3bf8f | [log] [tgz] |
---|---|---|
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | Sun Oct 01 02:25:22 2017 +0300 |
committer | Tom Rini <trini@konsulko.com> | Sun Oct 08 16:19:56 2017 -0400 |
tree | a680cc06ac395af2a49a48b5d5107e5de4b084e7 | |
parent | bb93c91cfe6558713323cf12835e4c88cf2b9370 [diff] |
fs/fat: Check malloc return values and fix memory leaks Check malloc() return values and properly unwind on errors so memory allocated for fat_itr structures get freed properly. Also fixes a leak of fsdata.fatbuf in fat_size(). Fixes: 2460098cffacd1 ("fs/fat: Reduce stack usage") Reported-by: Coverity (CID: 167225, 167233, 167234) Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Tom Rini <trini@konsulko.com>