summaryrefslogtreecommitdiffstats
path: root/Modules/_sre.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-08-16 05:03:44 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-08-16 05:03:44 (GMT)
commit10bc0f6edf4c24bffe13a0f7aae060ea477aad1e (patch)
treeb7f2ec825359c46103224f56f1a213948cb0e580 /Modules/_sre.c
parent432ea4ff375f920fa4a469d34e5dad56fb33f915 (diff)
parent3a27b0857ef6d35911509eef88e567663bb0a0b6 (diff)
downloadcpython-10bc0f6edf4c24bffe13a0f7aae060ea477aad1e.zip
cpython-10bc0f6edf4c24bffe13a0f7aae060ea477aad1e.tar.gz
cpython-10bc0f6edf4c24bffe13a0f7aae060ea477aad1e.tar.bz2
merge 3.3 (#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 d6fcda1..8d111e3 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2137,10 +2137,8 @@ match_groupdict(MatchObject* self, PyObject* args, PyObject* kw)
if (!key)
goto failed;
value = match_getslice(self, key, def);
- if (!value) {
- Py_DECREF(key);
+ if (!value)
goto failed;
- }
status = PyDict_SetItem(result, key, value);
Py_DECREF(value);
if (status < 0)