]> Git Repo - J-u-boot.git/commit
fs/fat: Check malloc return values and fix memory leaks
authorTuomas Tynkkynen <[email protected]>
Sat, 30 Sep 2017 23:25:22 +0000 (02:25 +0300)
committerTom Rini <[email protected]>
Sun, 8 Oct 2017 20:19:56 +0000 (16:19 -0400)
commitaf609e3764ea3ed7c0ccad8e57f9d9671c81c3e8
treea680cc06ac395af2a49a48b5d5107e5de4b084e7
parent09fa964bba80c45432660f0e64362181900a5aef
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 <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
fs/fat/fat.c
This page took 0.03445 seconds and 4 git commands to generate.