From f08fbbb8bc29e257e49bf6289a554f263a990f1e Mon Sep 17 00:00:00 2001 From: Abhinav Upadhyay Date: Tue, 1 Jan 2013 12:53:44 +0530 Subject: [PATCH] Fix some more memory leaks in the spell correction code. --- apropos-utils.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apropos-utils.c b/apropos-utils.c index 07d4c61..ec3da59 100644 --- a/apropos-utils.c +++ b/apropos-utils.c @@ -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; } @@ -628,6 +633,7 @@ free_list(char **list, int n) free(list[i]); i++; } + free(list); } /*