From: Guido van Rossum Date: Wed, 7 Sep 1994 14:36:45 +0000 (+0000) Subject: rearranged code in debugging version of DELREF to avoid touching data X-Git-Tag: v1.1~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9776adf56561fa492f6261e1710ac2ac0e7fdc08;p=thirdparty%2FPython%2Fcpython.git rearranged code in debugging version of DELREF to avoid touching data after it has been freed. --- diff --git a/Objects/object.c b/Objects/object.c index 072b50bbbb94..04e1ede89df0 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -406,12 +406,13 @@ UNREF(op) DELREF(op) object *op; { + destructor dealloc = op->ob_type->tp_dealloc; UNREF(op); #ifdef COUNT_ALLOCS op->ob_type->tp_free++; #endif - (*(op)->ob_type->tp_dealloc)(op); op->ob_type = NULL; + (*dealloc)(op); } printrefs(fp)