Request: Fix memory leak and crash in ValidateInput

This commit is contained in:
tt2468 2021-06-16 04:18:37 -07:00
parent 271db036fe
commit ce8f393eb8

View File

@ -150,6 +150,7 @@ obs_source_t *Request::ValidateInput(const std::string keyName, RequestStatus::R
}
if (obs_source_get_type(ret) != OBS_SOURCE_TYPE_INPUT) {
obs_source_release(ret);
statusCode = RequestStatus::InvalidSourceType;
comment = "The specified source is not an input.";
return nullptr;