Skip to content

Commit

Permalink
Perl_clear_defarray - AvREIFY_only() applied, array does not actually…
Browse files Browse the repository at this point in the history
… need Zeroing
  • Loading branch information
richardleach committed May 22, 2021
1 parent 7faeda8 commit 4391e33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pp_hot.c
Expand Up @@ -4975,6 +4975,7 @@ Perl_clear_defarray(pTHX_ AV* av, bool abandon)
else {
const SSize_t size = AvFILLp(av) + 1;
/* The ternary gives consistency with av_extend() */
/* fill can be -1. The ternary gives consistency with av_extend() */
AV *newav = newAV_alloc_x(size < 4 ? 4 : size);
AvREIFY_only(newav);
PAD_SVl(0) = MUTABLE_SV(newav);
Expand Down

0 comments on commit 4391e33

Please sign in to comment.