MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / subst_expr_free

Function subst_expr_free

re.c:46–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46void subst_expr_free(struct subst_expr* se)
47{
48 int i;
49
50 if (se->replacement.s) pkg_free(se->replacement.s);
51 if (se->re) { regfree(se->re); pkg_free(se->re); };
52 for (i = 0; i < se->n_escapes; i++) {
53 if (se->replace[i].type != REPLACE_SPEC)
54 continue;
55 if (se->replace[i].u.spec.pvp.pvi.type == PV_IDX_PVAR)
56 pv_spec_free(se->replace[i].u.spec.pvp.pvi.u.dval);
57 if ((se->replace[i].u.spec.pvp.pvv_flags & PV_PARAM_PVV_SHM) &&
58 se->replace[i].u.spec.pvp.pvv.s)
59 shm_free(se->replace[i].u.spec.pvp.pvv.s);
60 }
61 pkg_free(se);
62}
63
64
65

Callers 4

subst_parserFunction · 0.85
tr_eval_reFunction · 0.85
fixup_free_substreFunction · 0.85
fixup_free_substreFunction · 0.85

Calls 2

pv_spec_freeFunction · 0.85
shm_freeFunction · 0.85

Tested by

no test coverage detected