summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2006-03-11 18:19:48 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2006-03-11 18:19:48 +0000
commitcff34ee126429f4aa50e8ab2a3bca376cec4c624 (patch)
treea708431c98c244cd24863df364b2a5084febecaf /epan
parent19f81800ba6afe40aec1a2d6742c1f03ed63b3fa (diff)
downloadwireshark-cff34ee126429f4aa50e8ab2a3bca376cec4c624.tar.gz
Close the files after reading!
svn path=/trunk/; revision=17591
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-k12.c1
-rw-r--r--epan/dtd_preparse.l4
2 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c
index 4527ae1132..9a88e4a21b 100644
--- a/epan/dissectors/packet-k12.c
+++ b/epan/dissectors/packet-k12.c
@@ -146,6 +146,7 @@ static GHashTable* k12_load_config(const gchar* filename) {
if (( fp = fopen(filename,"r") )) {
len = fread(buffer,1,0xFFFF,fp);
+ fclose(fp);
} else {
report_open_failure(filename, errno, FALSE);
return NULL;
diff --git a/epan/dtd_preparse.l b/epan/dtd_preparse.l
index 979d8625ff..e38cb46f39 100644
--- a/epan/dtd_preparse.l
+++ b/epan/dtd_preparse.l
@@ -184,7 +184,9 @@ extern GString* dtd_preparse(const gchar* dname,const gchar* fname, GString* er
BEGIN OUTSIDE;
yylex();
-
+
+ fclose(yyin);
+
yyrestart(NULL);
g_hash_table_foreach_remove(entities,free_gstring_hash_items,NULL);