summaryrefslogtreecommitdiffstats
path: root/Modules/pcremodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-04-25 15:59:32 (GMT)
committerGuido van Rossum <guido@python.org>2000-04-25 15:59:32 (GMT)
commitc4428c58bba8a951c06df6c0689bb0d818049deb (patch)
tree6d9fa369c403c6ac326bf3e3683c2b781c743d51 /Modules/pcremodule.c
parent7da3cc5dfbbc722238a6140acccba469f66e7fac (diff)
downloadcpython-c4428c58bba8a951c06df6c0689bb0d818049deb.zip
cpython-c4428c58bba8a951c06df6c0689bb0d818049deb.tar.gz
cpython-c4428c58bba8a951c06df6c0689bb0d818049deb.tar.bz2
Charles G Waldman: Doing a PyObject_New then PyMem_DEL causes havoc if
you are trying to use Py_TRACE_REFS.
Diffstat (limited to 'Modules/pcremodule.c')
-rw-r--r--Modules/pcremodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c
index f44726e..4d2aa72 100644
--- a/Modules/pcremodule.c
+++ b/Modules/pcremodule.c
@@ -204,7 +204,7 @@ PyPcre_compile(self, args)
&error, &erroroffset, dictionary);
if (rv->regex==NULL)
{
- PyMem_DEL(rv);
+ Py_DECREF(rv);
if (!PyErr_Occurred())
{
PyObject *errval = Py_BuildValue("si", error, erroroffset);
@@ -217,7 +217,7 @@ PyPcre_compile(self, args)
if (rv->regex_extra==NULL && error!=NULL)
{
PyObject *errval = Py_BuildValue("si", error, 0);
- PyMem_DEL(rv);
+ Py_DECREF(rv);
PyErr_SetObject(ErrorObject, errval);
Py_XDECREF(errval);
return NULL;
@@ -228,7 +228,7 @@ PyPcre_compile(self, args)
PyObject *errval = Py_BuildValue("si", error, rv->num_groups);
PyErr_SetObject(ErrorObject, errval);
Py_XDECREF(errval);
- PyMem_DEL(rv);
+ Py_DECREF(rv);
return NULL;
}
return (PyObject *)rv;