projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c58934f
)
Minor CLI fix
author
Mark Spencer
<markster@digium.com>
Tue, 29 Apr 2003 05:32:37 +0000
(
05:32
+0000)
committer
Mark Spencer
<markster@digium.com>
Tue, 29 Apr 2003 05:32:37 +0000
(
05:32
+0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@934
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
cli.c
patch
|
blob
|
history
diff --git
a/cli.c
b/cli.c
index
04aa02c
..
fa33bcc
100755
(executable)
--- a/
cli.c
+++ b/
cli.c
@@
-775,11
+775,8
@@
int ast_cli_generatornummatches(char *text, char *word)
while ( (buf = ast_cli_generator(text, word, i)) ) {
if (++i > 1 && strcmp(buf,oldbuf) == 0) {
- free(buf);
continue;
}
- if (oldbuf)
- free(oldbuf);
oldbuf = buf;
matches++;
}
@@
-876,7
+873,7
@@
static char *__ast_cli_generator(char *text, char *word, int state, int lock)
if (lock)
ast_pthread_mutex_unlock(&clilock);
free(dup);
- return res ? strdup(res) : NULL;
+ return res ? res : NULL;
}
}
}