int fixup_free_pvar_all(void** param, int param_no) { pvs_fixup_t* pvs_f; if (*param) { pvs_f = *param; *param = pvs_f->orig; /* free only the contents (don't attempt to free &pvs_f->pvs)*/ pv_spec_destroy(&pvs_f->pvs); /* free the whole pvs_fixup_t */ pkg_free(pvs_f); } return 0; }
/** free the pv_spec_t structure. */ void pv_spec_free(pv_spec_t *spec) { if(spec==0) return; pv_spec_destroy(spec); pkg_free(spec); }