mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-02-20 22:52:26 +01:00
firmware-utils/mktitanimg: fix possible resource leak
Add missing call to `fclose` for file pointer `nsp_image`. Signed-off-by: Andrea Dalla Costa <andrea@dallacosta.me>
This commit is contained in:
parent
1775f690d5
commit
8057970d2a
1 changed files with 1 additions and 0 deletions
|
|
@ -225,6 +225,7 @@ int main(int argc, char* argv[], char* env[])
|
|||
if(fwrite((void*)buf,1,padding,nsp_image)!=padding) {
|
||||
printf("ERROR: can't write to %s.\n", filen_out);
|
||||
free(buf);
|
||||
fclose(nsp_image);
|
||||
return -1;
|
||||
}
|
||||
free(buf);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue