]> granicus.if.org Git - python/commitdiff
I think this fixes
authorMichael W. Hudson <mwh@python.net>
Wed, 30 Jan 2002 15:39:28 +0000 (15:39 +0000)
committerMichael W. Hudson <mwh@python.net>
Wed, 30 Jan 2002 15:39:28 +0000 (15:39 +0000)
[ #510644 ] test_curses segfaults

If we use the *object* *allocator*, we should use the *object* *deallocator*,
not the *raw memory* deallocator (confused yet?).

I think this was what caused segfaults when pymalloc was enabled.

Even if it wasn't the cause, it's still wrong.

2.2.1 candidate.

Modules/_cursesmodule.c

index e785e485cada71fc8751b5097ab28352bdcbbffc..f819a9e57f72374826e6cb89a6651ca06a357024 100644 (file)
@@ -356,7 +356,7 @@ static void
 PyCursesWindow_Dealloc(PyCursesWindowObject *wo)
 {
   if (wo->win != stdscr) delwin(wo->win);
-  PyMem_DEL(wo);
+  PyObject_DEL(wo);
 }
 
 /* Addch, Addstr, Addnstr */