X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt-context.c;h=e0cd073c9c09d854c236b23bb370a224546a8a6a;hb=27d2368e5c6430d26f046373f0ce81da29aac1b2;hp=961d80e111fcf25d57d48b332b3b58360e31bdff;hpb=0f034e0f5fac7dd35c19e82f1773ec293fdb2dcd;p=lttng-modules.git diff --git a/ltt-context.c b/ltt-context.c index 961d80e1..e0cd073c 100644 --- a/ltt-context.c +++ b/ltt-context.c @@ -33,7 +33,7 @@ struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx_p) if (!new_fields) return NULL; if (ctx->fields) - memcpy(new_fields, ctx->fields, ctx->nr_fields); + memcpy(new_fields, ctx->fields, sizeof(*ctx->fields) * ctx->nr_fields); kfree(ctx->fields); ctx->fields = new_fields; }