goto error;
}
- comm_ret = lttcomm_send_unix_sock(sessiond_socket, &lsm, sizeof(lsm));
+ comm_ret = lttcomm_send_creds_unix_sock(sessiond_socket, &lsm, sizeof(lsm));
if (comm_ret < 0) {
ret_code = LTTNG_ERR_FATAL;
goto error;
error:
if (sessiond_socket >= 0) {
ret = close(sessiond_socket);
- PERROR("Failed to close the LTTng session daemon connection socket");
+ if (ret < 0) {
+ PERROR("Failed to close the LTTng session daemon connection socket");
+ }
}
if (handle) {
lttng_destruction_handle_destroy(handle);