diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-10 06:42:25 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-10 06:42:25 (GMT) |
commit | 2c4e4f98397bcc591ad3a551e1e57cea0e2bd986 (patch) | |
tree | f200b67e22e157d409945e29f400e9766eb61beb /Parser/bitset.c | |
parent | 65c05b20e97a493b917fa71f10535512c713c662 (diff) | |
download | cpython-2c4e4f98397bcc591ad3a551e1e57cea0e2bd986.zip cpython-2c4e4f98397bcc591ad3a551e1e57cea0e2bd986.tar.gz cpython-2c4e4f98397bcc591ad3a551e1e57cea0e2bd986.tar.bz2 |
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.
Diffstat (limited to 'Parser/bitset.c')
-rw-r--r-- | Parser/bitset.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/bitset.c b/Parser/bitset.c index 3834e19..0f3e01c 100644 --- a/Parser/bitset.c +++ b/Parser/bitset.c @@ -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 |