parse-event: Fix memset pointer size bug in handle
authorSteven Rostedt <srostedt@redhat.com>
Thu, 5 Apr 2012 22:48:05 +0000 (00:48 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Wed, 25 Apr 2012 11:35:44 +0000 (13:35 +0200)
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>
tools/lib/traceevent/event-parse.c

index 876b2720253da27f83e0ad6a6db75c0b0c06aff6..ec1317483010341097a14156558006e4fd330d33 100644 (file)
@@ -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);