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.2@51300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2
Russell Bryant 19 years ago
parent 91d1c70906
commit 0a73ba87b1

@ -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;

Loading…
Cancel
Save