]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
cli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 20 Aug 2014 22:13:44 +0000 (22:13 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 20 Aug 2014 22:13:44 +0000 (22:13 +0000)
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().

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421600 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cli.c

index 02803b90882acdca78aacbc986d0f7b78a11af37..dee29c0da51e9a12ef9c6d8a9ffbf3e7b54d1028 100644 (file)
@@ -241,7 +241,7 @@ static char *complete_fn(const char *word, int state)
        if (c)
                c = ast_strdup(c);
 
-       free(d);
+       ast_std_free(d);
        
        return c;
 }