diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index e0f112d3c4f..c7d297a12a3 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -1352,6 +1352,7 @@ parse_include(void) /* if the command was "include_next" we have to disregard the first hit */ if (yyin && include_next) { + fclose (yyin); yyin = NULL; include_next = false; }