commit | 54b32c987146123f2237f0e21b1d02b1c1ebdf6f | [log] [tgz] |
---|---|---|
author | Brandt Bucher <brandtbucher@gmail.com> | Tue Nov 19 11:16:29 2019 -0800 |
committer | T. Wouters <thomas@python.org> | Tue Nov 19 11:16:29 2019 -0800 |
tree | d7b3139c2c421732b26c48d95e5d2de89b6be370 | |
parent | 8e0de2a4808d7c2f4adedabff89ee64e0338790a [diff] [blame] |
bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236)
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c index 1e5b0f7..11906aa 100644 --- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c
@@ -668,8 +668,10 @@ return NULL; /* Add some symbolic constants to the module */ - if (all_ins(m) < 0) + if (all_ins(m) < 0) { + Py_DECREF(m); return NULL; + } return m; }