X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libust%2Fbuffers.c;h=c2928c03092fa77417d33e8368ebd5306f56a36d;hb=4292ed8a2fd23d186b7d3a5985a3f219948e6796;hp=b7b2318cb748c47acf924ace7c6aacde4f2b1652;hpb=7756d65ab75135fc9b62b5376fd43f3fb1d534cc;p=ust.git diff --git a/libust/buffers.c b/libust/buffers.c index b7b2318..c2928c0 100644 --- a/libust/buffers.c +++ b/libust/buffers.c @@ -482,6 +482,13 @@ static void ltt_relay_print_errors(struct ltt_trace_struct *trace, struct ust_buffer *ltt_buf = channel->buf; long cons_off; + /* + * Can be called in the error path of allocation when + * trans_channel_data is not yet set. + */ + if (!channel) + return; + for (cons_off = atomic_long_read(<t_buf->consumed); (SUBBUF_TRUNC(local_read(<t_buf->offset), channel)