diff options
author | Brandt Bucher <brandtbucher@gmail.com> | 2019-11-19 19:16:29 (GMT) |
---|---|---|
committer | T. Wouters <thomas@python.org> | 2019-11-19 19:16:29 (GMT) |
commit | 54b32c987146123f2237f0e21b1d02b1c1ebdf6f (patch) | |
tree | d7b3139c2c421732b26c48d95e5d2de89b6be370 /Modules | |
parent | 8e0de2a4808d7c2f4adedabff89ee64e0338790a (diff) | |
download | cpython-54b32c987146123f2237f0e21b1d02b1c1ebdf6f.zip cpython-54b32c987146123f2237f0e21b1d02b1c1ebdf6f.tar.gz cpython-54b32c987146123f2237f0e21b1d02b1c1ebdf6f.tar.bz2 |
bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/fcntlmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ PyInit_fcntl(void) 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; } |