ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *name, size_t inlen,
FR_TOKEN type, request_refs_t request_def, pair_lists_t list_def, bool do_escape);
-void tmpl_free(value_pair_tmpl_t **tmpl);
-
bool tmpl_cast_in_place(value_pair_tmpl_t *vpt, PW_TYPE type, DICT_ATTR const *enumv);
void tmpl_cast_in_place_str(value_pair_tmpl_t *vpt);
cf_pair_filename(cp), cf_pair_lineno(cp));
}
- tmpl_free(&map->rhs);
+ TALLOC_FREE(map->rhs);
map->rhs = tmpl_alloc(map, TMPL_TYPE_NULL, NULL, 0);
}
return slen;
}
-/** Release memory allocated to value pair template.
- *
- * @param[in,out] tmpl to free.
- */
-void tmpl_free(value_pair_tmpl_t **tmpl)
-{
- if (*tmpl == NULL) return;
-
- if ((*tmpl)->type != TMPL_TYPE_UNKNOWN) VERIFY_TMPL(*tmpl);
-
- dict_attr_free(&((*tmpl)->tmpl_da));
-
- talloc_free(*tmpl);
-
- *tmpl = NULL;
-}
-
/** Print a template to a string
*
* @param[out] buffer for the output string