I encountered an error with a program developed under
python 2.4 which was tested with 2.5 - it actually did
everything it should but it complained about
free(): invalid pointer [some address]!
after its work has been done.
The fix to this error is simple: in
Modules/LDAPObject.c, line 55 one has to change
"PyMem_DEL(self)" to "PyObject_DEL(self)".
(a diff for the latest cvs-version is included)
The reason for this error is most probably this
development in python 2.5:
"Previously these different families all reduced to the
platform's malloc() and free() functions. This meant it
didn't matter if you got things wrong and allocated
memory with the PyMem function but freed it with the
PyObject function. With 2.5's changes to obmalloc,
these families now do different things and mismatches
will probably result in a segfault. You should
carefully test your C extension modules with Python 2.5."