perf header: Fix a typo on evsel
authorNamhyung Kim <namhyung.kim@lge.com>
Thu, 6 Sep 2012 02:10:45 +0000 (11:10 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 6 Sep 2012 13:49:03 +0000 (10:49 -0300)
For checking return value of the strdup, 'event' should be 'evsel'.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1346897446-16569-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c

index 43425b7..8b0b873 100644 (file)
@@ -2307,7 +2307,7 @@ static int perf_evsel__set_tracepoint_name(struct perf_evsel *evsel,
 
        snprintf(bf, sizeof(bf), "%s:%s", event->system, event->name);
        evsel->name = strdup(bf);
-       if (event->name == NULL)
+       if (evsel->name == NULL)
                return -1;
 
        evsel->tp_format = event;