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: http://svn.digium.com/svn/asterisk/trunk@253579 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
4349aaed67
commit
86d8630481
|
@ -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);
|
||||
|
|
Reference in New Issue