summaryrefslogtreecommitdiff
path: root/tools/perf/util/sort.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-22 04:33:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-22 04:33:17 +0300
commit1aaaa9acaea1dd2878d6c92b45e4c117ef425baf (patch)
treef1fe5948a6da8850862ae751da0b62dac351517f /tools/perf/util/sort.c
parent73577d61799e8d8bb7d69a9acdc54923e5998138 (diff)
parentfa8410b355251fd30341662a40ac6b22d3e38468 (diff)
downloadlinux-1aaaa9acaea1dd2878d6c92b45e4c117ef425baf.tar.xz
Merge 4.8-rc3 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/util/sort.c')
-rw-r--r--tools/perf/util/sort.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 947d21f38398..3d3cb8392c86 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -588,7 +588,11 @@ static char *get_trace_output(struct hist_entry *he)
} else {
pevent_event_info(&seq, evsel->tp_format, &rec);
}
- return seq.buffer;
+ /*
+ * Trim the buffer, it starts at 4KB and we're not going to
+ * add anything more to this buffer.
+ */
+ return realloc(seq.buffer, seq.len + 1);
}
static int64_t