diff options
author | Mark Spencer <markster@digium.com> | 2003-11-09 20:31:54 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-11-09 20:31:54 +0000 |
commit | d48b05d8ab16008c2e07c3f295f6ae1c77ab71bd (patch) | |
tree | 9fa6542ab8523c4ddd39c2b76ef3c6e29fa435f4 | |
parent | 9f110a3b8162bd4066ca423c36bf2173420bfb3d (diff) |
Back out "leak" fixes, as it causes segfaults
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | asterisk.c | 5 | ||||
-rwxr-xr-x | cli.c | 4 |
2 files changed, 1 insertions, 8 deletions
diff --git a/asterisk.c b/asterisk.c index 29c1645eb..8e64773f6 100755 --- a/asterisk.c +++ b/asterisk.c @@ -949,7 +949,6 @@ static char *cli_complete(EditLine *el, int ch) if (matches) { int i; - int x; int matches_num, maxlen, match_len; if (matches[0][0] != '\0') { @@ -979,10 +978,6 @@ static char *cli_complete(EditLine *el, int ch) retval = CC_REFRESH; } } - for (x=0; matches[x]; x++) { - free(matches[x]); - matches[x] = NULL; - } free(matches); } @@ -864,14 +864,12 @@ 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; } oldbuf = buf; matches++; } - free(oldbuf); - free(buf); + return matches; } |