summaryrefslogtreecommitdiffstats
path: root/Modules/_sre.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-08-16 05:05:16 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-08-16 05:05:16 (GMT)
commit0a3ccacec7a5b05db7cd6187d359aa5146459e09 (patch)
tree8aaa1a97338744dd31871b6f033358181f2f876e /Modules/_sre.c
parenta853c479eeefb0c8a3a68291951db868593367cf (diff)
parent76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049 (diff)
downloadcpython-0a3ccacec7a5b05db7cd6187d359aa5146459e09.zip
cpython-0a3ccacec7a5b05db7cd6187d359aa5146459e09.tar.gz
cpython-0a3ccacec7a5b05db7cd6187d359aa5146459e09.tar.bz2
merge 3.5 (#27774)
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r--Modules/_sre.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 512b3f2..6f8ec0e 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2194,10 +2194,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)