free(new_ctx);
return ret;
}
- /* Taking ownership of f. */
new_ctx->fields[new_ctx->nr_fields - 1] = *f;
lttng_context_update(new_ctx);
lttng_ust_rcu_assign_pointer(*ctx_p, new_ctx);
return;
for (i = 0; i < ctx->nr_fields; i++) {
if (ctx->fields[i].destroy)
- ctx->fields[i].destroy(&ctx->fields[i]);
+ ctx->fields[i].destroy(ctx->fields[i].priv);
}
free(ctx->fields);
free(ctx);