Skip to content

Commit

Permalink
C: fix B::PADLIST::save
Browse files Browse the repository at this point in the history
left is a free of a static ptr
  • Loading branch information
Reini Urban committed Oct 21, 2012
1 parent 8a51ad4 commit ae3300d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/B/C.pm
Expand Up @@ -3956,8 +3956,20 @@ sub B::AV::save {
}
$init->no_split;

if (ref $av eq 'B::PADLIST') {
my $fill1 = $fill+1;
$init->add("{", "\tPAD **svp;");
$init->add("\tregister int gcount;") if $count;
$init->add(
"\tPADLIST *padl = $sym;",
"\tNewx(svp, $fill, PAD *);",
"\tPadlistARRAY(padl) = svp;",
);
$init->add( substr( $acc, 0, -2 ) );
$init->add("}");
}
# With -fav-init2 use independent_comalloc()
if ($B::C::av_init2) {
elsif ($B::C::av_init2) {
my $i = $av_index;
$xpvav_sizes[$i] = $fill;
my $init_add = "{ SV **svp = avchunks[$i]; AV *av = $sym;\n";
Expand Down

0 comments on commit ae3300d

Please sign in to comment.