perf/events: Correct size given to memset
authorJulia Lawall <julia@diku.dk>
Thu, 5 Apr 2012 22:47:59 +0000 (00:47 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Wed, 25 Apr 2012 11:35:25 +0000 (13:35 +0200)
This is a forward port of commit 5660ce34241ab
perf tools: Correct size given to memset
written by Julia Lawall and forward ported by Steven Rostedt.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arun Sharma <asharma@fb.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
tools/lib/traceevent/event-parse.c

index f012395d16fb286f347346706e9c32217f15a9f6..16da20c552bc4de5c5f13ce702ffe7cf15211b0f 100644 (file)
@@ -2076,7 +2076,7 @@ process_fields(struct event_format *event, struct print_flag_sym **list, char **
                        goto out_free;
 
                field = malloc_or_die(sizeof(*field));
-               memset(field, 0, sizeof(field));
+               memset(field, 0, sizeof(*field));
 
                value = arg_eval(arg);
                field->value = strdup(value);