diff options
| author | Lioncash <mathew1800@gmail.com> | 2013-08-08 17:56:15 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2013-08-08 17:56:15 -0400 |
| commit | cce809ac90cc195f0c88a6cc788b3ff7359083a5 (patch) | |
| tree | 4fb3cf7e723e54499948ff3d926f453187f8e319 /Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp | |
| parent | 72abe7c65459e68c4e4d7a1cfca7098eec6d6708 (diff) | |
Fix a memory leak in ExpressionParser.cpp
Because there's a return here, expr should be deleted since it's not assigned to anything before returning.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp index d91fbc587c..1186551bf6 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp @@ -549,7 +549,10 @@ ExpressionParseStatus ParseExpressionInner(std::string str, ControlFinder &finde Parser p(tokens, finder); status = p.Parse(&expr); if (status != EXPRESSION_PARSE_SUCCESS) + { + delete expr; return status; + } *expr_out = expr; return EXPRESSION_PARSE_SUCCESS; |
