X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=9cc91cc4006615b0d3aa171cec01e2d3ee8faec8;hp=ba4e5a057eb79464835a0ae159fbc0d1f2cf3091;hb=18aeca0536f05906bf4364bc831fd7c769f60608;hpb=83b934ad2222dc44bb58fee7157e63b29c300a13 diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index ba4e5a057..9cc91cc40 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -1518,6 +1518,7 @@ struct session_info *find_or_create_session_info( if (!session) { ERR("[notification-thread] Failed to allocation session info for session \"%s\" (uid = %i, gid = %i)", name, uid, gid); + lttng_session_trigger_list_destroy(trigger_list); goto error; } trigger_list = NULL; @@ -2276,9 +2277,9 @@ int handle_notification_thread_command( struct notification_thread_command *cmd; /* Read the event pipe to put it back into a quiescent state. */ - ret = read(lttng_pipe_get_readfd(handle->cmd_queue.event_pipe), &counter, + ret = lttng_read(lttng_pipe_get_readfd(handle->cmd_queue.event_pipe), &counter, sizeof(counter)); - if (ret == -1) { + if (ret != sizeof(counter)) { goto error; }