Skip to content

Commit bfacaf7

Browse files
committed
fix potential refleak in std::array type caster
1 parent 87f0c34 commit bfacaf7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/nanobind/stl/detail/nb_array.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ template <typename Array, typename Entry, size_t Size> struct array_caster {
3333

3434
value[i] = caster.operator cast_t<Entry>();
3535
}
36-
37-
Py_XDECREF(temp);
3836
}
3937

38+
Py_XDECREF(temp);
39+
4040
return success;
4141
}
4242

0 commit comments

Comments
 (0)