- new_field->event_field->name = new_field->field_name;
- new_field->event_field->type.atype = atype_dynamic;
+ type = zmalloc(sizeof(struct lttng_ust_type_common));
+ if (!type) {
+ ret = -ENOMEM;
+ goto error_field_type_alloc;
+ }
+ app_ctx = zmalloc(sizeof(struct lttng_ust_app_ctx));
+ if (!app_ctx) {
+ ret = -ENOMEM;
+ goto error_app_ctx_alloc;
+ }
+ event_field->name = ctx_name;
+ type->type = lttng_ust_type_dynamic;
+ event_field->type = type;
+ new_field.event_field = event_field;