git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8da2d1
)
r24698: Patch from Andrew Kroeger <andrew@sprocks.gotdns.com> to fix Bug
author
Andrew Bartlett
<abartlet@samba.org>
Mon, 27 Aug 2007 10:16:54 +0000
(10:16 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 20:02:49 +0000
(15:02 -0500)
#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
)
source4/client/client.c
patch
|
blob
|
history
diff --git
a/source4/client/client.c
b/source4/client/client.c
index a10d4254a3a4a5e5d6a15fb64f9583d57ca2e496..1fdbec4bfd010f5f90f1bb3e84e30e5a86f9d55b 100644
(file)
--- 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;