From: Steven Rostedt Date: Thu, 5 Apr 2012 22:48:05 +0000 (+0200) Subject: parse-event: Fix memset pointer size bug in handle X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=42c80139eaa0feebf961c9792fa9eef76a3ce663;p=linux-beck.git parse-event: Fix memset pointer size bug in handle Fix memset(ptr, 0, sizeof(ptr)) to memset(ptr, 0, sizeof(*ptr)) Signed-off-by: Steven Rostedt Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Steven Rostedt Cc: Borislav Petkov Cc: Jiri Olsa Cc: Arun Sharma Cc: Namhyung Kim Signed-off-by: Frederic Weisbecker --- diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 876b2720253d..ec1317483010 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -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);