X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=e20c476f830342612721dfb0f5d93c9474b80e08;hb=7c2551ef99cb5b7a927373a198013601ee43fd9a;hp=00a2bf66f559f1d5b8d6ee2c019e3dd0c2241534;hpb=8f56701fa4b73a75378e88a84b0500e18b51ff49;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 00a2bf66f..e20c476f8 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -405,6 +405,7 @@ int notification_thread_client_subscribe(struct notification_client *client, &iter); node = cds_lfht_iter_get_node(&iter); if (!node) { + free(client_list_element); goto end_unlock; } @@ -1948,9 +1949,7 @@ int handle_notification_thread_channel_sample( * The monitoring pipe only holds messages smaller than PIPE_BUF, * ensuring that read/write of sampling messages are atomic. */ - do { - ret = read(pipe, &sample_msg, sizeof(sample_msg)); - } while (ret == -1 && errno == EINTR); + ret = lttng_read(pipe, &sample_msg, sizeof(sample_msg)); if (ret != sizeof(sample_msg)) { ERR("[notification-thread] Failed to read from monitoring pipe (fd = %i)", pipe);