Skip to content

Commit 54b32c9

Browse files
brandtbucherYhg1s
authored andcommitted
bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236)
1 parent 8e0de2a commit 54b32c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: Modules/fcntlmodule.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,10 @@ PyInit_fcntl(void)
668668
return NULL;
669669

670670
/* Add some symbolic constants to the module */
671-
if (all_ins(m) < 0)
671+
if (all_ins(m) < 0) {
672+
Py_DECREF(m);
672673
return NULL;
674+
}
673675

674676
return m;
675677
}

0 commit comments

Comments
 (0)