Permalink
Browse files

fixed SV leaks on get_tag_list

  • Loading branch information...
1 parent 78b5424 commit ef1005a4eeeeac8d31b7ead46f546c7fc4ba5a97 @typester committed Apr 3, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 XS.xs
  2. +4 −4 t/01_tag001.t
View
2 XS.xs
@@ -513,7 +513,7 @@ get_tag_list(swf)
swf_object_t *swf;
PREINIT:
int i = 0;
- AV* data = newAV();
+ AV* data = (AV*)sv_2mortal((SV*)newAV());
swf_tag_t *tag = NULL;
swf_tag_info_t *tag_info = NULL;
CODE:
View
@@ -50,7 +50,7 @@ my $expect = [
},
];
-{
+tests {
my $d1 = get_file_contents('/resource/textvar.swf');
my $swfed = SWFEditor->new();
$swfed->input(\$d1);
@@ -60,9 +60,9 @@ my $expect = [
$expect,
'',
);
-}
+};
-{
+tests {
my $d1 = get_file_path('/resource/textvar.swf');
my $swfed = SWFEditor->new();
$swfed->input($d1);
@@ -72,6 +72,6 @@ my $expect = [
$expect,
'',
);
-}
+};
done_testing();

0 comments on commit ef1005a

Please sign in to comment.