diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-29 05:32:37 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-29 05:32:37 +0000 |
commit | de9226dc77cb30f83a9e51e488ca3218807a969f (patch) | |
tree | b6a76e637848825305205e08af0e5f1f85f3640e | |
parent | c78c8b66e958ce959f8ec2176c80b40d9927d94d (diff) |
Minor CLI fix
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@934 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | cli.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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; } } } |