summaryrefslogtreecommitdiff
path: root/tools/perf/util/ordered-events.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-11 11:05:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-11 11:05:58 +0300
commit5c07488d996b6b2af609f351bf54c9909ed0fdf8 (patch)
tree62cc2522698d7383cdf4a4f450bde30bc45f1832 /tools/perf/util/ordered-events.c
parentb5390f4b5e0b75634c7f08c88e97b5fe0e833599 (diff)
parentd13937116f1e82bf508a6325111b322c30c85eb9 (diff)
downloadlinux-5c07488d996b6b2af609f351bf54c9909ed0fdf8.tar.xz
Merge 5.0-rc6 into char-misc-next
We need the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/util/ordered-events.c')
-rw-r--r--tools/perf/util/ordered-events.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 897589507d97..ea523d3b248f 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -391,8 +391,10 @@ void ordered_events__free(struct ordered_events *oe)
* Current buffer might not have all the events allocated
* yet, we need to free only allocated ones ...
*/
- list_del(&oe->buffer->list);
- ordered_events_buffer__free(oe->buffer, oe->buffer_idx, oe);
+ if (oe->buffer) {
+ list_del(&oe->buffer->list);
+ ordered_events_buffer__free(oe->buffer, oe->buffer_idx, oe);
+ }
/* ... and continue with the rest */
list_for_each_entry_safe(buffer, tmp, &oe->to_free, list) {