summaryrefslogtreecommitdiff
path: root/trafgen_parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'trafgen_parser.y')
-rw-r--r--trafgen_parser.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/trafgen_parser.y b/trafgen_parser.y
index 21c3454..a05b7e8 100644
--- a/trafgen_parser.y
+++ b/trafgen_parser.y
@@ -635,7 +635,8 @@ void compile_packets(char *file, bool verbose, unsigned int cpu, bool invoke_cpp
ret = 0;
err:
- fclose(yyin);
+ if (yyin != stdin)
+ fclose(yyin);
if (invoke_cpp)
unlink(tmp_file);