X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt-context.c;h=8f00bb1bd0067437170efa7aaecd23df8768212e;hb=a0bea89bba00be4c2fc348b7c21fa7b0e4298a66;hp=961d80e111fcf25d57d48b332b3b58360e31bdff;hpb=0f034e0f5fac7dd35c19e82f1773ec293fdb2dcd;p=lttng-modules.git diff --git a/ltt-context.c b/ltt-context.c index 961d80e1..8f00bb1b 100644 --- a/ltt-context.c +++ b/ltt-context.c @@ -4,6 +4,8 @@ * Copyright 2011 (c) - Mathieu Desnoyers * * LTTng trace/channel/event context management. + * + * Dual LGPL v2.1/GPL v2 license. */ #include @@ -33,7 +35,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; }