Index: client/client.c =================================================================== --- client/client.c (revision 24697) +++ client/client.c (working copy) @@ -2922,9 +2922,10 @@ return matches; cleanup: - while (i >= 0) { - free(matches[i]); - i--; + count--; + while (count >= 0) { + free(matches[count]); + count--; } free(matches); return NULL;