summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-08-16 05:05:06 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-08-16 05:05:06 (GMT)
commit76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049 (patch)
tree5e2120e7db3e46a36facd5b789b1681a604dcdc0 /Modules
parent81b9ecd2a3338cad109c2827af423867e46c6808 (diff)
parent10bc0f6edf4c24bffe13a0f7aae060ea477aad1e (diff)
downloadcpython-76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049.zip
cpython-76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049.tar.gz
cpython-76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049.tar.bz2
merge 3.4 (#27774)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_sre.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 84c8769..09b5835 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2196,10 +2196,8 @@ _sre_SRE_Match_groupdict_impl(MatchObject *self, PyObject *default_value)
if (!key)
goto failed;
value = match_getslice(self, key, default_value);
- if (!value) {
- Py_DECREF(key);
+ if (!value)
goto failed;
- }
status = PyDict_SetItem(result, key, value);
Py_DECREF(value);
if (status < 0)