Refactoring: use an opaque lttng_tracker_id type
[lttng-tools.git] / src / bin / lttng-sessiond / thread.c
index 6eb5e8efb3124f67b7f1315c788162eaa67f31dd..ff6c0962f33768390500e7e5da2cedee55311a5f 100644 (file)
@@ -140,6 +140,9 @@ bool lttng_thread_get(struct lttng_thread *thread)
 
 void lttng_thread_put(struct lttng_thread *thread)
 {
+       if (!thread) {
+               return;
+       }
        assert(thread->ref.refcount);
        urcu_ref_put(&thread->ref, lttng_thread_release);
 }
@@ -169,6 +172,7 @@ bool _lttng_thread_shutdown(struct lttng_thread *thread)
        if (ret) {
                PERROR("Failed to join \"%s\" thread", thread->name);
                result = false;
+               goto end;
        }
        /* Release the list's reference to the thread. */
        cds_list_del(&thread->node);
This page took 0.022982 seconds and 4 git commands to generate.