From: Richard Mudgett Date: Wed, 20 Aug 2014 22:19:41 +0000 (+0000) Subject: cli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled. X-Git-Tag: 12.6.0-rc1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeeb397778ed374a9939e9b40b00a3dad4935db1;p=thirdparty%2Fasterisk.git cli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled. filename_completion_function() returns memory that was not allocated by the MALLOC_DEBUG allocation tracker so the memory must be freed by ast_std_free(). ........ Merged revisions 421600 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 421602 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@421608 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/cli.c b/main/cli.c index bff58695d8..76c4962f4a 100644 --- a/main/cli.c +++ b/main/cli.c @@ -239,7 +239,7 @@ static char *complete_fn(const char *word, int state) if (c) c = ast_strdup(c); - free(d); + ast_std_free(d); return c; }