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 /asterisk.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 'asterisk.c')
-rwxr-xr-x | asterisk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/asterisk.c b/asterisk.c index 8e64773f6..29c1645eb 100755 --- a/asterisk.c +++ b/asterisk.c @@ -949,6 +949,7 @@ 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') { @@ -978,6 +979,10 @@ 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); } |