diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c index fe4cc9a073bf36..2fb41982077dde 100644 --- a/Modules/regexmodule.c +++ b/Modules/regexmodule.c @@ -536,7 +536,6 @@ regex_symcomp(PyObject *self, PyObject *args) gdict = PyDict_New(); if (gdict == NULL || (npattern = symcomp(pattern, gdict)) == NULL) { Py_XDECREF(gdict); - Py_DECREF(pattern); return NULL; } retval = newregexobject(npattern, tran, pattern, gdict);