projects
/
platform
/
upstream
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31401af
)
close File yyin before calling yylex_destroy
author
Homer Hsing
<homer.xing@intel.com>
Thu, 6 Sep 2012 08:12:08 +0000
(16:12 +0800)
committer
Damien Lespiau
<damien.lespiau@intel.com>
Mon, 4 Mar 2013 15:54:30 +0000
(15:54 +0000)
This patch makes sure file handler yyin is closed.
yylex_destroy() calls yy_init_globals(), which reset yyin to 0.
Therefore if we do not close yyin before yylex_destroy(), yyin
will not be closed anymore.
assembler/src/main.c
patch
|
blob
|
history
diff --git
a/assembler/src/main.c
b/assembler/src/main.c
index
d2c5701
..
b5f06dc
100644
(file)
--- a/
assembler/src/main.c
+++ b/
assembler/src/main.c
@@
-275,11
+275,11
@@
int main(int argc, char **argv)
err = yyparse();
- yylex_destroy();
-
- if (yyin)
+ if (strcmp(argv[0], "-"))
fclose(yyin);
+ yylex_destroy();
+
if (err || errors)
exit (1);