diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2015-11-25 15:58:22 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2015-11-25 15:58:22 +0200 |
commit | e71c1a855797de245105494a05623753e32844a4 (patch) | |
tree | a89c01c4014daf57e700bfffef76081508eebff0 /src | |
parent | b9df6a46ac8bd1dcbb3a3061fed4d86d739be21b (diff) | |
download | grecs-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.l | 5 |
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; |