From coverity scan.
Signed-off-by: David Goulet <dgoulet@efficios.com>
error:
ret = EXIT_FAILURE;
- lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_EXIT_FAILURE);
+ if (ctx) {
+ lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_EXIT_FAILURE);
+ }
end:
lttng_consumer_destroy(ctx);
if (ua_chan == NULL) {
/* Only malloc can fail here */
ret = -ENOMEM;
- goto error;
+ goto error_alloc;
}
shadow_copy_channel(ua_chan, uchan);
error:
delete_ust_app_channel(ua_chan->is_sent ? app->sock : -1, ua_chan, app);
+error_alloc:
return ret;
}