From: Mathieu Desnoyers Date: Tue, 23 Aug 2011 20:40:02 +0000 (-0400) Subject: Fix metadata channel creation X-Git-Tag: v1.9.1~271 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1b2c2540d02d98833e3243284e0833fd3799a5a7;p=lttng-ust.git Fix metadata channel creation Signed-off-by: Mathieu Desnoyers --- diff --git a/libust/ltt-ring-buffer-metadata-client.h b/libust/ltt-ring-buffer-metadata-client.h index 8efa9e37..00c07fc5 100644 --- a/libust/ltt-ring-buffer-metadata-client.h +++ b/libust/ltt-ring-buffer-metadata-client.h @@ -165,7 +165,9 @@ struct ltt_channel *_channel_create(const char *name, ltt_chan->handle = channel_create(&client_config, name, ltt_chan, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); - ltt_chan->chan = shmp(handle, handle->chan); + if (!ltt_chan->handle) + return NULL; + ltt_chan->chan = shmp(ltt_chan->handle, ltt_chan->handle->chan); return ltt_chan; }