8000 BUG: Add missing DECREF in new path · numpy/numpy@fa5754e · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)
0