Skip to content

Commit

Permalink
textops: reinitialize new tr_param_t object for tr_txt_parse_re()
Browse files Browse the repository at this point in the history
- avoid segfault when running fparam_free_restore() on
  such an object immediately after creation, because its field "next"
  contains garbage

(cherry picked from commit 38b8fbd)
(cherry picked from commit 5f5f7fd)
  • Loading branch information
lyokha authored and miconda committed Apr 25, 2018
1 parent bc2e413 commit 5272835
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/textops/txt_var.c
Expand Up @@ -215,6 +215,7 @@ char* tr_txt_parse_re(str *in, trans_t *t)
LM_ERR("no more private memory!\n");
goto error;
}
memset(tp, 0, sizeof(tr_param_t));

se=subst_parser(&tok);

Expand Down

0 comments on commit 5272835

Please sign in to comment.