SF patch #1467512, fix double free with triple quoted string in standard build.

This was the result of inconsistent use of PyMem_* and PyObject_* allocators.
By changing to use PyObject_* allocator almost everywhere, this removes
the inconsistency.
This commit is contained in:
Neal Norwitz 2006-04-10 06:42:25 +00:00
parent 65c05b20e9
commit 2c4e4f9839
9 changed files with 45 additions and 37 deletions

View file

@ -8,7 +8,7 @@ bitset
newbitset(int nbits)
{
int nbytes = NBYTES(nbits);
bitset ss = PyMem_NEW(BYTE, nbytes);
bitset ss = PyObject_MALLOC(sizeof(BYTE) * nbytes);
if (ss == NULL)
Py_FatalError("no mem for bitset");
@ -22,7 +22,7 @@ newbitset(int nbits)
void
delbitset(bitset ss)
{
PyMem_DEL(ss);
PyObject_FREE(ss);
}
int