Skip to content

Commit d1e4aa2

Browse files
Fixup
1 parent db8247e commit d1e4aa2

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Objects/longobject.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3620,13 +3620,11 @@ long_richcompare(PyObject *self, PyObject *other, int op)
36203620
void
36213621
_PyLong_ExactDealloc(PyObject *self)
36223622
{
3623-
if (PyLong_CheckExact(self)) {
3624-
if (_PyLong_IsCompact((PyLongObject *)self)) {
3625-
_Py_FREELIST_FREE(ints, self, PyObject_Free);
3626-
return;
3627-
}
3623+
if (_PyLong_IsCompact((PyLongObject *)self)) {
3624+
_Py_FREELIST_FREE(ints, self, PyObject_Free);
3625+
return;
36283626
}
3629-
Py_TYPE(self)->tp_free(self);
3627+
PyObject_Free(self);
36303628
}
36313629

36323630
static void
@@ -3650,6 +3648,14 @@ long_dealloc(PyObject *self)
36503648
}
36513649
}
36523650
}
3651+
3652+
if (PyLong_CheckExact(self)) {
3653+
if (_PyLong_IsCompact((PyLongObject *)self)) {
3654+
_Py_FREELIST_FREE(ints, self, PyObject_Free);
3655+
return;
3656+
}
3657+
}
3658+
36533659
Py_TYPE(self)->tp_free(self);
36543660
}
36553661

0 commit comments

Comments
 (0)