diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 84a33f1e9ec92..cd870129131e1 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -2667,7 +2667,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;