Skip to content

Instantly share code, notes, and snippets.

@mlschroe
Created August 26, 2011 15:37
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 mlschroe/1173686 to your computer and use it in GitHub Desktop.
Save mlschroe/1173686 to your computer and use it in GitHub Desktop.
--- src/binder/multidispatch.c.orig 2011-08-26 15:13:52.000000000 +0000
+++ src/binder/multidispatch.c 2011-08-26 15:24:12.000000000 +0000
@@ -292,6 +292,8 @@ static Rakudo_md_candidate_info** sort_c
if (info) {
if (info->types)
mem_sys_free(info->types);
+ if (info->definednesses)
+ mem_sys_free(info->definednesses);
if (info->constraints)
mem_sys_free(info->constraints);
mem_sys_free(info);
@@ -535,8 +537,10 @@ static PMC* find_best_candidate(PARROT_I
}
/* If we were looking for many candidates, we're done now. */
- if (many)
+ if (many) {
+ mem_sys_free(possibles);
return many_res;
+ }
/* Check is default trait if we still have multiple options and we want one. */
if (possibles_count > 1) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment