Skip to content

Commit 4e5f2db

Browse files
authored
gh-98872: Fix a possible resource leak in Python 3.11.0 (GH-99047)
Issue: #98872 Automerge-Triggered-By: GH:kumaraditya303
1 parent b4d54a3 commit 4e5f2db

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a possible fd leak in ``Programs/_freeze_module.c`` introduced in Python 3.11.

Programs/_freeze_module.c

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ write_frozen(const char *outpath, const char *inpath, const char *name,
194194

195195
if (ferror(outfile)) {
196196
fprintf(stderr, "error when writing to '%s'\n", outpath);
197+
fclose(outfile);
197198
return -1;
198199
}
199200
fclose(outfile);

0 commit comments

Comments
 (0)