Skip to content

Commit

Permalink
Fixed segmenation fault caused by accessing deallocated memory
Browse files Browse the repository at this point in the history
  • Loading branch information
danpascu committed Sep 11, 2018
1 parent 48af2b4 commit 0e1535a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/acc/acc_logic.c
Expand Up @@ -1198,9 +1198,10 @@ int do_acc_fixup(void** param, int param_no)
memset(acc_param, 0, sizeof(acc_type_param_t));

if (el->next == 0 && el->spec.getf == 0) {
str text = el->text;
pv_elem_free_all(el);
if ( (ival=do_acc_parse(&el->text, parser)) == DO_ACC_ERR) {
LM_ERR("Invalid value <%.*s>!\n", el->text.len, el->text.s);
if ((ival = do_acc_parse(&text, parser)) == DO_ACC_ERR) {
LM_ERR("Invalid value <%.*s>!\n", text.len, text.s);
return -1;
}

Expand Down

0 comments on commit 0e1535a

Please sign in to comment.