Skip to content

Commit 8fdce22

Browse files
committed
BUG: Should use default free for new-style dtypes
1 parent 16c0fac commit 8fdce22

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

numpy/_core/src/multiarray/descriptor.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,6 +2025,8 @@ arraydescr_dealloc(PyArray_Descr *self)
20252025
{
20262026
Py_XDECREF(self->typeobj);
20272027
if (!PyDataType_ISLEGACY(self)) {
2028+
/* non legacy dtypes must not have fields, etc. */
2029+
Py_TYPE(self)->tp_free((PyObject *)self);
20282030
return;
20292031
}
20302032
_PyArray_LegacyDescr *lself = (_PyArray_LegacyDescr *)self;

0 commit comments

Comments
 (0)