| 44 | |
| 45 | |
| 46 | void 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 |
no test coverage detected