MLK-20356-1 common: Fix resource leak in sparse image writting

Fix coverity issue CID 18031: Resource leak (RESOURCE_LEAK)
leaked_storage: Variable fill_buf going out of scope leaks the storage it points to

Should free the fill_buf before function return.

Signed-off-by: Ye Li <ye.li@nxp.com>
This commit is contained in:
Ye Li 2018-11-14 01:10:53 -08:00
parent bc1550557f
commit bc23ae569c
1 changed files with 1 additions and 0 deletions

View File

@ -200,6 +200,7 @@ void write_sparse_image(
__func__);
fastboot_fail(
"Request would exceed partition size!");
free(fill_buf);
return;
}