diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-11-09 19:33:39 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-11-09 19:33:39 +0000 |
commit | 91a86e54c5c92c3240d926214fb493f71a154dae (patch) | |
tree | 2f1c96cacfe028a1445442a9f639761c5d5717b4 /cli.c | |
parent | 86a72b8c9a59b7a18fd772b01ce40a240dc7a0d3 (diff) |
CLI memory leak patch
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1712 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-x | cli.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -864,12 +864,14 @@ 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; } |