The various kernel tracer file descriptors are closed during an
initialization error, but are not set to `-1` which causes them to
be closed again when the session daemon performs its clean-up.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I11d3ce7accea51394c34b9ca7ea0445e4ee422fc
PERROR("Failed to close kernel tracer file descriptor: fd = %d",
kernel_tracer_fd);
}
+
kernel_tracer_fd = -1;
return LTTNG_ERR_KERN_VERSION;
kernel_tracer_event_notifier_group_notification_fd);
}
+ kernel_tracer_event_notifier_group_notification_fd = -1;
+
error_modules:
ret = close(kernel_tracer_event_notifier_group_fd);
if (ret) {
kernel_tracer_event_notifier_group_fd);
}
+ kernel_tracer_event_notifier_group_fd = -1;
+
ret = close(kernel_tracer_fd);
if (ret) {
PERROR("Failed to close kernel tracer file descriptor: fd = %d",
kernel_tracer_fd);
}
+ kernel_tracer_fd = -1;
+
error_open:
modprobe_remove_lttng_control();