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:
parent
bc1550557f
commit
bc23ae569c
|
|
@ -200,6 +200,7 @@ void write_sparse_image(
|
||||||
__func__);
|
__func__);
|
||||||
fastboot_fail(
|
fastboot_fail(
|
||||||
"Request would exceed partition size!");
|
"Request would exceed partition size!");
|
||||||
|
free(fill_buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue