From: Namhyung Kim <namhyung....@lge.com>

For checking return value of the strdup, 'event' should be 'evsel'.

Signed-off-by: Namhyung Kim <namhy...@kernel.org>
---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 06ecd577d1b8..eb7a8da2f4f5 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2512,7 +2512,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;
-- 
1.7.11.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to