projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5aed916
)
Fix a potential file descriptor leak.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 12 Jul 2014 12:34:39 +0000
(14:34 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 12 Jul 2014 12:34:39 +0000
(14:34 +0200)
Found by cppcheck.
src/invitation.c
patch
|
blob
|
history
diff --git
a/src/invitation.c
b/src/invitation.c
index a6996cc692aee9857fc8866b3ce30a7a7c5919c2..28f9f8ce0755468f8c4abea0f9cc07e016011900 100644
(file)
--- a/
src/invitation.c
+++ b/
src/invitation.c
@@
-613,6
+613,7
@@
make_names:
FILE *fh = fopen(filename, "w");
if(!fh) {
fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno));
+ fclose(f);
return false;
}