summaryrefslogtreecommitdiff
path: root/Modules/_sre.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-08-15 22:03:44 -0700
committerBenjamin Peterson <benjamin@python.org>2016-08-15 22:03:44 -0700
commit10bc0f6edf4c24bffe13a0f7aae060ea477aad1e (patch)
treeb7f2ec825359c46103224f56f1a213948cb0e580 /Modules/_sre.c
parent432ea4ff375f920fa4a469d34e5dad56fb33f915 (diff)
parent3a27b0857ef6d35911509eef88e567663bb0a0b6 (diff)
downloadcpython-git-10bc0f6edf4c24bffe13a0f7aae060ea477aad1e.tar.gz
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 d6fcda18b6..8d111e382a 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)