summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/fcntlmodule.c4
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;
}