diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 46daa22b86e3b..85ff4f68adc00 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -2690,7 +2690,7 @@ static char *prefix_if_not_in(const char *pre, char *str) return str; if (asprintf(&n, "%s,%s", pre, str) < 0) - return NULL; + n = NULL; free(str); return n;