Add missing error handling
[lttng-ust.git] / libust / ltt-ring-buffer-client.h
index f15711c1320e00d7c7b3dc9f88100dd195f15510..b3e6f007115ef99a58f30e5f09463c3549a6836e 100644 (file)
@@ -381,7 +381,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;
 }
 
@@ -489,7 +491,7 @@ int ltt_is_disabled(struct channel *chan)
 }
 
 static struct ltt_transport ltt_relay_transport = {
-       .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING,
+       .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING "-mmap",
        .ops = {
                .channel_create = _channel_create,
                .channel_destroy = ltt_channel_destroy,
This page took 0.036995 seconds and 4 git commands to generate.