Skip to content

Commit daa8699

Browse files
authored
Merge pull request #27672 from charris/backport-27666
BUG: Fix a reference count leak in npy_find_descr_for_scalar.
2 parents 614ca19 + f055fb9 commit daa8699

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

numpy/_core/src/multiarray/abstractdtypes.c

-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ npy_find_descr_for_scalar(
476476
/* If the DType doesn't know the scalar type, guess at default. */
477477
!NPY_DT_CALL_is_known_scalar_type(common, Py_TYPE(scalar))) {
478478
if (common->singleton != NULL) {
479-
Py_INCREF(common->singleton);
480479
res = common->singleton;
481480
Py_INCREF(res);
482481
}

0 commit comments

Comments
 (0)