Skip to content

Commit

Permalink
parse-event: Fix memset pointer size bug in handle
Browse files Browse the repository at this point in the history
Fix memset(ptr, 0, sizeof(ptr)) to memset(ptr, 0, sizeof(*ptr))

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>
  • Loading branch information
Steven Rostedt authored and Frederic Weisbecker committed Apr 25, 2012
1 parent 2e7a5fc commit 42c8013
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lib/traceevent/event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -4904,7 +4904,7 @@ int pevent_register_event_handler(struct pevent *pevent,
not_found:
/* Save for later use. */
handle = malloc_or_die(sizeof(*handle));
memset(handle, 0, sizeof(handle));
memset(handle, 0, sizeof(*handle));
handle->id = id;
if (event_name)
handle->event_name = strdup(event_name);
Expand Down

0 comments on commit 42c8013

Please sign in to comment.