Skip to content
Snippets Groups Projects
Commit e4c20dbe authored by Mark Spencer's avatar Mark Spencer
Browse files

Minor CLI fix

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent c58934fd
Branches
Tags
No related merge requests found
......@@ -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;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment