//!< #CONF_PARSER structs, forming the subsection.
size_t subcs_size; //!< If non-zero, allocate structs of this size to hold
//!< the parsed data.
+ char const *subcs_type; //!< Set a specific talloc type for subcs structures.
};
};
*/
if (!subcs_size) return cf_section_parse(ctx, out, subcs);
- if (out) MEM(buff = talloc_array(ctx, uint8_t, subcs_size));
+ if (out) {
+ MEM(buff = talloc_array(ctx, uint8_t, subcs_size));
+ if (rule->subcs_type) talloc_set_name_const(buff, rule->subcs_type);
+ }
ret = cf_section_parse(buff, buff, subcs);
if (ret < 0) {
/*
* Allocate an array to hold the subsections
*/
- if (out) MEM(array = talloc_array(ctx, uint8_t *, count));
-
+ if (out) {
+ MEM(array = talloc_array(ctx, uint8_t *, count));
+ if (rule->subcs_type) talloc_set_name(array, "%s *", rule->subcs_type);
+ }
/*
* Start parsing...
*
if (array) {
MEM(buff = talloc_zero_array(array, uint8_t, subcs_size));
+ if (rule->subcs_type) talloc_set_name_const(buff, rule->subcs_type);
array[i] = buff;
}