aboutsummaryrefslogtreecommitdiffstats
path: root/epan/radius_dict.l
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-12-20 02:50:04 +0000
committerGerald Combs <gerald@wireshark.org>2005-12-20 02:50:04 +0000
commit32e9ed7da99d1e1ed87e7e08273ef535158dba6a (patch)
treedd9601aa5e282dcdff7511fde27c44e145298b79 /epan/radius_dict.l
parentfb6610f77da6fdac0105edfe638e69e6c9c59f9d (diff)
Make sure we don't try to close an already-closed file.
svn path=/trunk/; revision=16863
Diffstat (limited to 'epan/radius_dict.l')
-rw-r--r--epan/radius_dict.l6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/radius_dict.l b/epan/radius_dict.l
index 3ea07a028d..d5233d072f 100644
--- a/epan/radius_dict.l
+++ b/epan/radius_dict.l
@@ -192,7 +192,8 @@
<<EOF>> {
- fclose(yyin);
+ fclose(yyin);
+ yyin = NULL;
if ( --include_stack_ptr < 0 ) {
yyterminate();
@@ -377,7 +378,8 @@ radius_dictionary_t* radius_load_dictionary (gchar* dir, const gchar* filename,
yylex();
- fclose(yyin);
+ if (yyin != NULL) fclose(yyin);
+ yyin = NULL;
for (i=0; i < 10; i++) {
if (fullpaths[i]) g_free(fullpaths[i]);