Requests: Autorelease created scene in CreateScene

Creating the scene increments the referenced scene by one,
but we do not decrement it. This produces a memory leak which
leads to the scene never being deleted after being removed from
the UI.
This commit is contained in:
tt2468 2021-05-14 01:44:59 -07:00
parent fe9419fb8a
commit 6740e5fec7

View File

@ -100,7 +100,8 @@ RpcResponse WSRequestHandler::CreateScene(const RpcRequest& request) {
if (source) {
return request.failed("scene with this name already exists");
}
obs_scene_create(sceneName);
obs_scene_t *createdScene = obs_scene_create(sceneName);
obs_scene_release(createdScene);
return request.success();
}