/* Remove from channel list */
cds_list_del(&channel->list);
- status = notification_thread_command_remove_channel(
- notification_thread_handle,
- channel->fd, LTTNG_DOMAIN_KERNEL);
- assert(status == LTTNG_OK);
+ if (notification_thread_handle) {
+ status = notification_thread_command_remove_channel(
+ notification_thread_handle,
+ channel->fd, LTTNG_DOMAIN_KERNEL);
+ assert(status == LTTNG_OK);
+ }
free(channel->channel->attr.extended.ptr);
free(channel->channel);
free(channel);
{
struct ltt_kernel_channel *chan;
struct lttng_channel attr;
+ struct lttng_channel_extended extended;
memset(&attr, 0, sizeof(attr));
+ memset(&extended, 0, sizeof(extended));
+ attr.attr.extended.ptr = &extended;
chan = trace_kernel_create_channel(&attr);
ok(chan != NULL, "Create kernel channel");