aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2015-11-25 15:58:22 +0200
committerSergey Poznyakoff <gray@gnu.org>2015-11-25 15:58:22 +0200
commite71c1a855797de245105494a05623753e32844a4 (patch)
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')
-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;
187int 187int
188yywrap() 188yywrap()
189{ 189{
190 if (yyin) 190 if (yyin) {
191 grecs_preproc_extrn_shutdown(grecs_preproc_pid); 191 grecs_preproc_extrn_shutdown(grecs_preproc_pid);
192 else 192 fclose(yyin);
193 } else
193 grecs_preproc_done(); 194 grecs_preproc_done();
194 grecs_current_locus_point.file = NULL; 195 grecs_current_locus_point.file = NULL;
195 return 1; 196 return 1;

Return to:

Send suggestions and report system problems to the System administrator.