Fix: pass private data to context callbacks
[lttng-ust.git] / liblttng-ust / lttng-context.c
index 7e558067542877f846bc7f46dee9e5e9989318c5..7043c1571d78b00fe555bc38756fd54f992e4aa7 100644 (file)
@@ -202,7 +202,6 @@ int lttng_ust_context_append_rcu(struct lttng_ust_ctx **ctx_p,
                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);
@@ -235,7 +234,7 @@ void lttng_destroy_context(struct lttng_ust_ctx *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);
This page took 0.023584 seconds and 4 git commands to generate.