summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-11-05 17:18:46 +0000
committerTim Potter <tpot@samba.org>2003-11-05 17:18:46 +0000
commitc4029527ef5d30d613e4c47f12fa5574eb9f0eb6 (patch)
tree5d7ce60dc454c2a3412f93e8460c1efcc5f55cf9
parent930245a0bc29bd548933787a7e17706aad1cbcb8 (diff)
downloadsamba-c4029527ef5d30d613e4c47f12fa5574eb9f0eb6.tar.gz
samba-c4029527ef5d30d613e4c47f12fa5574eb9f0eb6.tar.bz2
samba-c4029527ef5d30d613e4c47f12fa5574eb9f0eb6.zip
Merge from 3.0:
Revision 1.209.2.44: Fix crash bug in smbclient completion. Closes bug #659. (This used to be commit decc5d9a2525176c70a17d8928587889f5f6e6af)
-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;
}