diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-08-27 10:16:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:02:49 -0500 |
commit | e98b3c1e97421e8757af8c19c3d2738cbe301555 (patch) | |
tree | ef9644db5f803be2546994acbe790071dfccf0ee /source4 | |
parent | b8da2d1ee512c00c4804d2db80d07d3442d9852f (diff) | |
download | samba-e98b3c1e97421e8757af8c19c3d2738cbe301555.tar.gz samba-e98b3c1e97421e8757af8c19c3d2738cbe301555.tar.bz2 samba-e98b3c1e97421e8757af8c19c3d2738cbe301555.zip |
r24698: Patch from Andrew Kroeger <andrew@sprocks.gotdns.com> to fix Bug
#4521: smbclient crashes during tab completion when tab hit twice.
The readline magic is beyond me, but this seems to do the trick.
Andrew Bartlett
(This used to be commit e05f3450ecc3f99509fbc069b09d402e3b6d7564)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/client/client.c | 7 |
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; |