From f1f3fd5d9d417447dfab69c531656cbe42eaf071 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Fri, 17 Feb 2023 18:26:23 -0800 Subject: [PATCH] InputCommon: Fix memory leak in ExpressionParser We allocate in MakeSuppressor via `return unique_ptr(std::make_unique<...>(...).release(), InvokingDeleter{}`, so it wasn't properly getting freed. --- Source/Core/InputCommon/ControlReference/ExpressionParser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp index 1f78071856..65f9ceba4f 100644 --- a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp +++ b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp @@ -37,6 +37,7 @@ public: void operator()(T* func) { (*func)(); + delete func; } };