projects
/
openwrt
/
staging
/
zorun.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1775f69
)
firmware-utils/mktitanimg: fix possible resource leak
author
Andrea Dalla Costa
<andrea@dallacosta.me>
Sat, 11 Jan 2020 23:05:55 +0000
(
00:05
+0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Tue, 14 Jan 2020 16:48:50 +0000
(17:48 +0100)
Add missing call to `fclose` for file pointer `nsp_image`.
Signed-off-by: Andrea Dalla Costa <andrea@dallacosta.me>
tools/firmware-utils/src/mktitanimg.c
patch
|
blob
|
history
diff --git
a/tools/firmware-utils/src/mktitanimg.c
b/tools/firmware-utils/src/mktitanimg.c
index cca4a0ebaece6b9d0aab173108465fc8abdee946..120d08f0c4fb7eee81031f1b3ebe7079a5cc39c4 100644
(file)
--- a/
tools/firmware-utils/src/mktitanimg.c
+++ b/
tools/firmware-utils/src/mktitanimg.c
@@
-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);