diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-19 16:44:09 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-19 16:44:09 +0000 |
commit | 3a554b86a483160496108844de986804baeca00a (patch) | |
tree | 452a39c6a5f895e06b910046b3cbdae06af313c0 /asterisk.c | |
parent | fd3f62d4038110360586aa583276c62d18618028 (diff) |
Fix a memory leak on command line tab completion. The container for the
matches was freed, but the individual matches themselves were not.
(issue #8851, arkadia)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@51300 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rw-r--r-- | asterisk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/asterisk.c b/asterisk.c index bc15eb5c7..d3b3989de 100644 --- a/asterisk.c +++ b/asterisk.c @@ -1656,7 +1656,9 @@ static char *cli_complete(EditLine *el, int ch) retval = CC_REFRESH; } } - free(matches); + for (i=0; matches[i]; i++) + free(matches[i]); + free(matches); } return (char *)(long)retval; |