Skip to content

Commit

Permalink
BUG: Add missing DECREF in new path
Browse files Browse the repository at this point in the history
Pretty, harmless reference count leak (the method is a singleton)
  • Loading branch information
seberg authored and charris committed Jun 19, 2021
1 parent 61127bb commit fa5754e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions numpy/core/src/multiarray/convert_datatype.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ PyArray_CheckCastSafety(NPY_CASTING casting,

if (PyArray_MinCastSafety(castingimpl->casting, casting) == casting) {
/* No need to check using `castingimpl.resolve_descriptors()` */
Py_DECREF(meth);
return 1;
}

Expand Down

0 comments on commit fa5754e

Please sign in to comment.