Skip to content

Commit

Permalink
Merge pull request #27672 from charris/backport-27666
Browse files Browse the repository at this point in the history
BUG: Fix a reference count leak in npy_find_descr_for_scalar.
  • Loading branch information
charris authored Oct 30, 2024
2 parents 614ca19 + f055fb9 commit daa8699
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion numpy/_core/src/multiarray/abstractdtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ npy_find_descr_for_scalar(
/* If the DType doesn't know the scalar type, guess at default. */
!NPY_DT_CALL_is_known_scalar_type(common, Py_TYPE(scalar))) {
if (common->singleton != NULL) {
Py_INCREF(common->singleton);
res = common->singleton;
Py_INCREF(res);
}
Expand Down

0 comments on commit daa8699

Please sign in to comment.