summaryrefslogtreecommitdiff
path: root/source4/client/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/client/client.c')
-rw-r--r--source4/client/client.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index a10d4254a3..1fdbec4bfd 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -2922,9 +2922,10 @@ static char **completion_fn(const char *text, int start, int end)
return matches;
cleanup:
- while (i >= 0) {
- free(matches[i]);
- i--;
+ count--;
+ while (count >= 0) {
+ free(matches[count]);
+ count--;
}
free(matches);
return NULL;