diff options
author | Mark Spencer <markster@digium.com> | 2003-11-09 19:33:39 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-11-09 19:33:39 +0000 |
commit | 9f110a3b8162bd4066ca423c36bf2173420bfb3d (patch) | |
tree | 2f1c96cacfe028a1445442a9f639761c5d5717b4 /cli.c | |
parent | f4cafc5041a0e5e7fa340b2c97315431624d5e85 (diff) |
CLI memory leak patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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; } |