summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-11-04 22:38:58 +0000
committerTim Potter <tpot@samba.org>2003-11-04 22:38:58 +0000
commitf46e42c69d270c93e3732d2bb28883f575903874 (patch)
tree216faae877a14b1745bf729604631ea9221571f4
parente7d9803d93ef9f0a13f5f192b60cab56a22e2e2f (diff)
downloadsamba-f46e42c69d270c93e3732d2bb28883f575903874.tar.gz
samba-f46e42c69d270c93e3732d2bb28883f575903874.tar.bz2
samba-f46e42c69d270c93e3732d2bb28883f575903874.zip
Fix crash bug in smbclient completion. Closes bug #659.
(This used to be commit 4480058d85ebe9175c4720c18100b459877dbd07)
-rw-r--r--source3/client/client.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index ecece8942e..5ee6913374 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2403,10 +2403,9 @@ static char **completion_fn(const char *text, int start, int end)
return matches;
cleanup:
- while (i >= 0) {
+ for (i = 0; i < count; i++)
free(matches[i]);
- i--;
- }
+
free(matches);
return NULL;
}