From ce8f393eb8f402f50ed391c0c7f161ca02c16ed8 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Wed, 16 Jun 2021 04:18:37 -0700 Subject: [PATCH] Request: Fix memory leak and crash in ValidateInput --- src/requesthandler/rpc/Request.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/requesthandler/rpc/Request.cpp b/src/requesthandler/rpc/Request.cpp index 5a877188..6bdbc2fd 100644 --- a/src/requesthandler/rpc/Request.cpp +++ b/src/requesthandler/rpc/Request.cpp @@ -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;