|
@@ -36,7 +36,6 @@ static struct log_context *create_or_fetch_log_context(void *context)
|
|
|
new_log_context = cached_log_contexts.array[cnt - 1];
|
|
new_log_context = cached_log_contexts.array[cnt - 1];
|
|
|
da_pop_back(cached_log_contexts);
|
|
da_pop_back(cached_log_contexts);
|
|
|
}
|
|
}
|
|
|
- pthread_mutex_unlock(&log_contexts_mutex);
|
|
|
|
|
|
|
|
|
|
if (!new_log_context)
|
|
if (!new_log_context)
|
|
|
new_log_context = bzalloc(sizeof(struct log_context));
|
|
new_log_context = bzalloc(sizeof(struct log_context));
|
|
@@ -47,6 +46,8 @@ static struct log_context *create_or_fetch_log_context(void *context)
|
|
|
|
|
|
|
|
da_push_back(active_log_contexts, &new_log_context);
|
|
da_push_back(active_log_contexts, &new_log_context);
|
|
|
|
|
|
|
|
|
|
+ pthread_mutex_unlock(&log_contexts_mutex);
|
|
|
|
|
+
|
|
|
return new_log_context;
|
|
return new_log_context;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -141,4 +142,4 @@ void obs_module_unload(void)
|
|
|
|
|
|
|
|
da_free(active_log_contexts);
|
|
da_free(active_log_contexts);
|
|
|
da_free(cached_log_contexts);
|
|
da_free(cached_log_contexts);
|
|
|
-}
|
|
|
|
|
|
|
+}
|