summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-05-20 10:07:57 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-05-20 10:07:57 +0200
commit7408b73c0ec138ffacd89ed9f7d3f9a0079d8916 (patch)
tree7e0e575337aa113b19784de60ecbdc67636994a9 /tools
parent4b041618cab0e46d6e8ea973f06cc0c0a6fe87b5 (diff)
orc: Close file after usage in the copied around file reading function
CID 1147011.
Diffstat (limited to 'tools')
-rw-r--r--tools/orc-bugreport.c2
-rw-r--r--tools/orcc.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/tools/orc-bugreport.c b/tools/orc-bugreport.c
index 359b3d9..da1d0c7 100644
--- a/tools/orc-bugreport.c
+++ b/tools/orc-bugreport.c
@@ -154,6 +154,8 @@ read_file (const char *filename)
contents[size] = 0;
+ fclose (file);
+
return contents;
bail:
/* something failed */
diff --git a/tools/orcc.c b/tools/orcc.c
index 6a92851..9217def 100644
--- a/tools/orcc.c
+++ b/tools/orcc.c
@@ -472,6 +472,8 @@ read_file (const char *filename)
contents[size] = 0;
+ fclose (file);
+
return contents;
bail:
/* something failed */