X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libust%2Fbuffers.c;h=c2928c03092fa77417d33e8368ebd5306f56a36d;hb=0207cc51527316a3cff9c713615413cb026bc637;hp=b7b2318cb748c47acf924ace7c6aacde4f2b1652;hpb=c9dab68ab1bf1dcc41d24cfc0881683a65824ad9;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)