Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Created July 26, 2014 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/4c459d3daea186e3a5ce to your computer and use it in GitHub Desktop.
Save FROGGS/4c459d3daea186e3a5ce to your computer and use it in GitHub Desktop.
diff --git a/src/core/args.c b/src/core/args.c
index 3970dc1..1ffa19f 100644
--- a/src/core/args.c
+++ b/src/core/args.c
@@ -86,6 +86,8 @@ MVMObject * MVM_args_use_capture(MVMThreadContext *tc, MVMFrame *f) {
MVMCallCapture *capture = (MVMCallCapture *)tc->cur_usecapture;
if (capture->body.use_mode_frame)
MVM_frame_dec_ref(tc, capture->body.use_mode_frame);
+ else if (capture->body.apc)
+ free(capture->body.apc);
capture->body.mode = MVM_CALL_CAPTURE_MODE_USE;
capture->body.use_mode_frame = MVM_frame_inc_ref(tc, f);
capture->body.apc = &f->params;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment