[PATCH 0/1] MR5364: widl: Always close parsed input file.
Fixes a regression from 9d537999e315a7, which removed closing the file. This causes Windows widl build to be to remove the temporary file on exit. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5364
From: Jacek Caban <jacek(a)codeweavers.com> Fixes a regression from 9d537999e315a7, which removed closing the file. This causes Windows widl build to be to remove the temporary file on exit. --- tools/widl/widl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/widl/widl.c b/tools/widl/widl.c index 9d3ea0c36bf..cb84938f6f8 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -836,9 +836,8 @@ int main(int argc,char *argv[]) init_types(); ret = parser_parse(); - if(ret) { - exit(1); - } + if (parser_in) fclose(parser_in); + if (ret) exit(1); /* Everything has been done successfully, don't delete any files. */ set_everything(FALSE); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5364
This causes Windows widl build to be to remove the temporary file on exit.
Do you mean "to fail to remove"? Shouldn't we then also make sure that all the imports are popped (and closed) on exit, or can we somehow assume they are? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5364#note_65504
participants (3)
-
Jacek Caban -
Jacek Caban (@jacek) -
Rémi Bernon