summaryrefslogtreecommitdiffstats
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
commitdecc5d9a2525176c70a17d8928587889f5f6e6af (patch)
tree2cee613f67fd6b4c32bc12785adb2d17713dba3c
parent079e00d1030130943791acd54b2af6036891c534 (diff)
downloadsamba-decc5d9a2525176c70a17d8928587889f5f6e6af.tar.gz
samba-decc5d9a2525176c70a17d8928587889f5f6e6af.tar.xz
samba-decc5d9a2525176c70a17d8928587889f5f6e6af.zip
Merge from 3.0:
Revision 1.209.2.44: Fix crash bug in smbclient completion. Closes bug #659.
-rw-r--r--source/client/client.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/client/client.c b/source/client/client.c
index ecece8942ec..5ee6913374a 100644
--- a/source/client/client.c
+++ b/source/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;
}