diff options
author | Ye Li <ye.li@nxp.com> | 2018-11-14 01:10:53 -0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2018-11-14 01:13:02 -0800 |
commit | bc23ae569c7aaea338648c000b7b733b09eb735a (patch) | |
tree | f2734136d858e6f9aa03dd074bc4c72c921959ad /common | |
parent | bc1550557f1f3a61bdbb58637de60537047ce94d (diff) |
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/image-sparse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/image-sparse.c b/common/image-sparse.c index 86ff5a04bb2..f3806431f9d 100644 --- a/common/image-sparse.c +++ b/common/image-sparse.c @@ -200,6 +200,7 @@ void write_sparse_image( __func__); fastboot_fail( "Request would exceed partition size!"); + free(fill_buf); return; } |