Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[src] Fixed yet another Parrot_pcc_split_signature_string() memory le…

…ak. I

won't miss this difficult-to-use-correctly function when it disappears.

git-svn-id: https://svn.parrot.org/parrot/trunk@45178 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
commit c9f655c86dcea29a87021faf11f3503a7049f46c 1 parent 8d6cdf7
@chromatic chromatic authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/extend.c
View
12 src/extend.c
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2007, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -1049,11 +1049,14 @@ Parrot_ext_call(PARROT_INTERP, ARGIN(Parrot_PMC sub_pmc),
va_list args;
PMC *call_obj;
char *arg_sig, *ret_sig;
- PMC *old_call_obj = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
+
+ PMC *old_call_obj = Parrot_pcc_get_signature(interp,
+ CURRENT_CONTEXT(interp));
Parrot_pcc_split_signature_string(interp, signature, &arg_sig, &ret_sig);
va_start(args, signature);
- call_obj = Parrot_pcc_build_call_from_varargs(interp, PMCNULL, arg_sig, &args);
+ call_obj = Parrot_pcc_build_call_from_varargs(interp, PMCNULL,
+ arg_sig, &args);
Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, call_obj);
call_obj = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
@@ -1061,8 +1064,11 @@ Parrot_ext_call(PARROT_INTERP, ARGIN(Parrot_PMC sub_pmc),
PARROT_ERRORS_RESULT_COUNT_FLAG);
va_end(args);
Parrot_pcc_set_signature(interp, CURRENT_CONTEXT(interp), old_call_obj);
+ mem_gc_free(interp, arg_sig);
+ mem_gc_free(interp, ret_sig);
}
+
/*
=item C<Parrot_Int Parrot_get_intreg(PARROT_INTERP, Parrot_Int regnum)>
Please sign in to comment.
Something went wrong with that request. Please try again.