Skip to content

Commit e384521

Browse files
committed
zero uninitialized memory
1 parent 9435f75 commit e384521

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/gradients.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function GradientCache(
3636
_c2 = nothing
3737
end
3838
end
39-
_c3 = similar(x)
39+
_c3 = zero(x)
4040
else # the scalar->vector case
4141
# need cache arrays for fx1 and fx2, except in complex mode, which needs one complex array
4242
if fdtype != Val(:complex)

0 commit comments

Comments
 (0)