X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Frotation-thread.c;h=b86b166892ad917fff5ba7f40366d0aa9bd08bc0;hb=ca3833f638213d2cf0604481fade27b4437dc985;hp=8e63e160f980c15f8e60af0ea8f74d88a89e758e;hpb=c78d8e86e2f739490df42fc4c9d2de22234b6114;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index 8e63e160f..b86b16689 100644 --- a/src/bin/lttng-sessiond/rotation-thread.c +++ b/src/bin/lttng-sessiond/rotation-thread.c @@ -761,9 +761,9 @@ int handle_job_queue(struct rotation_thread_handle *handle, * possible for a job targeting that session to have * already been queued before it was destroyed. */ - session_unlock_list(); free(job); session_put(session); + session_unlock_list(); continue; } @@ -832,7 +832,6 @@ int handle_condition(const struct lttng_condition *condition, goto end; } session_lock(session); - session_unlock_list(); ret = unsubscribe_session_consumed_size_rotation(session, notification_thread_handle); @@ -861,6 +860,7 @@ int handle_condition(const struct lttng_condition *condition, end_unlock: session_unlock(session); session_put(session); + session_unlock_list(); end: return ret; } @@ -974,6 +974,10 @@ void *thread_rotation(void *data) int fd = LTTNG_POLL_GETFD(&thread.events, i); uint32_t revents = LTTNG_POLL_GETEV(&thread.events, i); + if (!revents) { + /* No activity for this FD (poll implementation). */ + continue; + } DBG("[rotation-thread] Handling fd (%i) activity (%u)", fd, revents);