X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Frotation-thread.c;h=a9f9967a3b49ee04d3fab5beba7b3d27c268c627;hp=f78e8ea25adf53bed9ad917e87338deaac328c95;hb=e32d7f274604b77bcd83c24994e88df3761ed658;hpb=a9577b7628a85b064c3f249c3504bad989848b49 diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index f78e8ea25..a9f9967a3 100644 --- a/src/bin/lttng-sessiond/rotation-thread.c +++ b/src/bin/lttng-sessiond/rotation-thread.c @@ -706,7 +706,6 @@ int handle_job_queue(struct rotation_thread_handle *handle, { int ret = 0; int fd = lttng_pipe_get_readfd(queue->event_pipe); - struct ltt_session *session; char buf; ret = lttng_read(fd, &buf, 1); @@ -717,6 +716,7 @@ int handle_job_queue(struct rotation_thread_handle *handle, } for (;;) { + struct ltt_session *session; struct rotation_thread_job *job; /* Take the queue lock only to pop an element from the list. */ @@ -747,12 +747,14 @@ int handle_job_queue(struct rotation_thread_handle *handle, */ session_unlock_list(); free(job); + session_put(session); continue; } session_lock(session); ret = run_job(job, session, handle->notification_thread_handle); session_unlock(session); + session_put(session); session_unlock_list(); free(job); if (ret) { @@ -841,6 +843,7 @@ int handle_condition(const struct lttng_condition *condition, end_unlock: session_unlock(session); + session_put(session); end: return ret; }