提交 d4cf9db6 编写于 作者: J jp9000

Remove unnecessary context initialization code

There was no need to call the context free function in the
initialization function, and it's safer to just initialize the memory to
0 before using (which also negates the need for da_init)
上级 87475cdf
......@@ -1188,10 +1188,9 @@ static inline bool obs_context_data_init_wrap(
const char *name)
{
assert(context);
memset(context, 0, sizeof(*context));
pthread_mutex_init_value(&context->rename_cache_mutex);
obs_context_data_free(context);
if (pthread_mutex_init(&context->rename_cache_mutex, NULL) < 0)
return false;
......@@ -1205,8 +1204,6 @@ static inline bool obs_context_data_init_wrap(
context->name = dup_name(name);
context->settings = obs_data_newref(settings);
da_init(context->rename_cache);
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册