提交 dd9107db 编写于 作者: J jp9000

libobs: Don't return valid obs_data if json fails

If obs_data_create_from_json fails on loading the json data, do not
return a valid data object; return NULL instead.
上级 f29431d8
......@@ -635,6 +635,8 @@ obs_data_t *obs_data_create_from_json(const char *json_string)
blog(LOG_ERROR, "obs-data.c: [obs_data_create_from_json] "
"Failed reading json string (%d): %s",
error.line, error.text);
obs_data_release(data);
data = NULL;
}
return data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册