Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix memory leaks, patch by mls++
  • Loading branch information
moritz committed Aug 26, 2011
1 parent 88d8014 commit 2742f6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/binder/multidispatch.c
Expand Up @@ -292,6 +292,8 @@ static Rakudo_md_candidate_info** sort_candidates(PARROT_INTERP, PMC *candidates
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);
Expand Down Expand Up @@ -535,8 +537,10 @@ static PMC* find_best_candidate(PARROT_INTERP, Rakudo_md_candidate_info **candid
}

/* 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) {
Expand Down

0 comments on commit 2742f6d

Please sign in to comment.