summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-07-20 20:04:11 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-07-20 20:04:11 (GMT)
commit0fb88f7c51cca016e6210e8058b5d5d271f79989 (patch)
tree7518304112fef295b07405e7a03187c9265e105f /Python
parent8f25762a9455882e87d06b0e1cfd11f92b1ab6fe (diff)
downloadcpython-0fb88f7c51cca016e6210e8058b5d5d271f79989.zip
cpython-0fb88f7c51cca016e6210e8058b5d5d271f79989.tar.gz
cpython-0fb88f7c51cca016e6210e8058b5d5d271f79989.tar.bz2
correct ref counting of default_action (closes #22017)
Diffstat (limited to 'Python')
-rw-r--r--Python/_warnings.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 445ff6b..92d6547 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -905,6 +905,7 @@ _PyWarnings_Init(void)
_default_action = PyString_FromString("default");
if (_default_action == NULL)
return;
+ Py_INCREF(_default_action);
if (PyModule_AddObject(m, "default_action", _default_action) < 0)
return;
}