Skip to content

Commit fa5754e

Browse files
sebergcharris
authored andcommitted
BUG: Add missing DECREF in new path
Pretty, harmless reference count leak (the method is a singleton)
1 parent 61127bb commit fa5754e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

numpy/core/src/multiarray/convert_datatype.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ PyArray_CheckCastSafety(NPY_CASTING casting,
476476

477477
if (PyArray_MinCastSafety(castingimpl->casting, casting) == casting) {
478478
/* No need to check using `castingimpl.resolve_descriptors()` */
479+
Py_DECREF(meth);
479480
return 1;
480481
}
481482

0 commit comments

Comments
 (0)