}
} else {
/* Empty path. */
- pathname = "";
+ pathname = strdup("");
}
/* Prep channel message structure */
health_code_update();
error:
+ free(pathname);
return ret;
}
}
} else {
/* Empty path. */
- pathname = "";
+ pathname = strdup("");
}
/* Prep channel message structure */
health_code_update();
error:
+ free(pathname);
return ret;
}
if (ret < 0) {
goto error;
}
-
- /* Flag that at least the metadata has been sent to the consumer. */
- session->consumer_fds_sent = 1;
}
/* Send channel and streams of it */
DBG("Kernel consumer FDs of metadata and channel streams sent");
+ session->consumer_fds_sent = 1;
return 0;
error:
DBG("Sending kernel consumer destroy channel key %d", channel->fd);
+ memset(&msg, 0, sizeof(msg));
msg.cmd_type = LTTNG_CONSUMER_DESTROY_CHANNEL;
msg.u.destroy_channel.key = channel->fd;
DBG("Sending kernel consumer destroy channel key %d", metadata->fd);
+ memset(&msg, 0, sizeof(msg));
msg.cmd_type = LTTNG_CONSUMER_DESTROY_CHANNEL;
msg.u.destroy_channel.key = metadata->fd;