Skip to content

Commit

Permalink
Fix some more memory leaks in the spell correction code.
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav-upadhyay committed Jan 1, 2013
1 parent 132aab0 commit f08fbbb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apropos-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,11 @@ edits1 (char *word)
counter++;
}
}

for (i = 0; i < n + 1; i++) {
free(splits[i].a);
free(splits[i].b);
}
return candidates;
}

Expand Down Expand Up @@ -628,6 +633,7 @@ free_list(char **list, int n)
free(list[i]);
i++;
}
free(list);
}

/*
Expand Down

0 comments on commit f08fbbb

Please sign in to comment.