From 879a71e92103a998f307479e18b73763fc5a5ce4 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 19 Jan 2007 16:56:17 +0000 Subject: [PATCH] Merged revisions 51300 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r51300 | russell | 2007-01-19 10:44:09 -0600 (Fri, 19 Jan 2007) | 4 lines 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@51302 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/asterisk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/asterisk.c b/main/asterisk.c index 40befc1cd1..e5e38d7251 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2037,6 +2037,8 @@ static char *cli_complete(EditLine *el, int ch) retval = CC_REFRESH; } } + for (i = 0; matches[i]; i++) + free(matches[i]); free(matches); }