perf parse-events: Fix NULL check against wrong variable

We did a null check after "tmp->symbol = strdup(...)", but we checked
"list->symbol" other than "tmp->symbol".

Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/tencent_DF39269807EC9425E24787E6DB632441A405@qq.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by Weiguo Li and committed by Arnaldo Carvalho de Melo a7a72631 ec9d50ac

Changed files
+1 -1
tools
perf
+1 -1
tools/perf/util/parse-events.c
··· 2193 2193 for (i = 0; i < ARRAY_SIZE(symbols); i++, tmp++) { 2194 2194 tmp->type = symbols[i].type; 2195 2195 tmp->symbol = strdup(symbols[i].symbol); 2196 - if (!list->symbol) 2196 + if (!tmp->symbol) 2197 2197 goto err_free; 2198 2198 } 2199 2199