Skip to content

Commit

Permalink
pythongh-98872: Fix a possible resource leak in Python 3.11.0 (python…
Browse files Browse the repository at this point in the history
…GH-99047)

Issue: pythonGH-98872
(cherry picked from commit 4e5f2db)

Co-authored-by: SQLPATCH <95843853+SQLPATCH@users.noreply.github.com>
Automerge-Triggered-By: GH:kumaraditya303
  • Loading branch information
SQLPATCH authored and miss-islington committed Nov 24, 2022
1 parent d74117a commit 3a5bd2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a possible fd leak in ``Programs/_freeze_module.c`` introduced in Python 3.11.
1 change: 1 addition & 0 deletions Programs/_freeze_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ write_frozen(const char *outpath, const char *inpath, const char *name,

if (ferror(outfile)) {
fprintf(stderr, "error when writing to '%s'\n", outpath);
fclose(outfile);
return -1;
}
fclose(outfile);
Expand Down

0 comments on commit 3a5bd2d

Please sign in to comment.