chiark / gitweb /
cdbmodule.c: Fix deallocation.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 10 Oct 2009 12:15:39 +0000 (13:15 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 10 Oct 2009 12:15:39 +0000 (13:15 +0100)
Use PyObject_Del rather than PyMem_DEL, because the former doesn't lead
to a ghastly crash.

src/cdbmodule.c

index bdf10dcd019b2d40784e0d0c3390035471a41201..bfd7f0026a9a50f7576b3314d8ec7c1ee8e920b9 100644 (file)
@@ -655,7 +655,7 @@ cdbo_dealloc(CdbObject *self) {  /* del(cdb_o) */
 
   cdb_free(&self->c);
 
-  PyMem_DEL(self);
+  PyObject_Del((PyObject *)self);
 }
 
 static PyObject *
@@ -823,7 +823,7 @@ cdbmake_dealloc(cdbmakeobject *self) {
     Py_DECREF(self->fntmp);
   }
 
-  PyMem_DEL(self);
+  PyObject_Del((PyObject *)self);
 }
 
 static PyObject *