summaryrefslogtreecommitdiff
path: root/funcs/func_strings.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2010-03-20 16:50:38 +0000
committerRussell Bryant <russell@russellbryant.com>2010-03-20 16:50:38 +0000
commit008930a3f20e68083837aef16e72551b71dbd221 (patch)
treeb527f70e86d6751bc3a64013932efe922b8fcbcd /funcs/func_strings.c
parent3da9f8ed19fb797a5defa8116225ede37876594a (diff)
Fix memory corruption found by unit tests.
ast_str_reset() was being called on a potentially uninitialized pointer. Valgrind is my hero, once again. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_strings.c')
-rw-r--r--funcs/func_strings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index fa0174c60..184300d25 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -525,7 +525,7 @@ static int listfilter(struct ast_channel *chan, const char *cmd, char *parse, ch
flen = strlen(args.fieldvalue);
- ast_str_reset(result);
+ ast_str_reset(*result_ptr);
/* Enough space for any result */
if (len > -1) {
ast_str_make_space(result_ptr, len ? len : ast_str_strlen(orig_list) + 1);