summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org>2015-11-25 13:58:22 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2015-11-25 13:58:22 (GMT)
commite71c1a855797de245105494a05623753e32844a4 (patch) (side-by-side diff)
treea89c01c4014daf57e700bfffef76081508eebff0 /src
parentb9df6a46ac8bd1dcbb3a3061fed4d86d739be21b (diff)
downloadgrecs-e71c1a855797de245105494a05623753e32844a4.tar.gz
grecs-e71c1a855797de245105494a05623753e32844a4.tar.bz2
Fix descriptor leak.
* src/grecs-lex.l (yywrap): Close yyin.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/grecs-lex.l5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/grecs-lex.l b/src/grecs-lex.l
index 52a15ef..63f2225 100644
--- a/src/grecs-lex.l
+++ b/src/grecs-lex.l
@@ -187,9 +187,10 @@ pid_t grecs_preproc_pid;
int
yywrap()
{
- if (yyin)
+ if (yyin) {
grecs_preproc_extrn_shutdown(grecs_preproc_pid);
- else
+ fclose(yyin);
+ } else
grecs_preproc_done();
grecs_current_locus_point.file = NULL;
return 1;

Return to:

Send suggestions and report system problems to the System administrator.