From f46e42c69d270c93e3732d2bb28883f575903874 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 4 Nov 2003 22:38:58 +0000 Subject: Fix crash bug in smbclient completion. Closes bug #659. (This used to be commit 4480058d85ebe9175c4720c18100b459877dbd07) --- source3/client/client.c | 5 ++--- 1 file 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; } -- cgit