mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Fixed memory leak caused by return statement parsing
This commit is contained in:
parent
70c663b253
commit
89ca14a587
2 changed files with 6 additions and 0 deletions
|
@ -900,6 +900,7 @@ class FxReturnStatement : public FxExpression
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FxReturnStatement(FxVMFunctionCall *call, const FScriptPosition &pos);
|
FxReturnStatement(FxVMFunctionCall *call, const FScriptPosition &pos);
|
||||||
|
~FxReturnStatement();
|
||||||
FxExpression *Resolve(FCompileContext&);
|
FxExpression *Resolve(FCompileContext&);
|
||||||
ExpEmit Emit(VMFunctionBuilder *build);
|
ExpEmit Emit(VMFunctionBuilder *build);
|
||||||
VMFunction *GetDirectFunction();
|
VMFunction *GetDirectFunction();
|
||||||
|
|
|
@ -3525,6 +3525,11 @@ FxReturnStatement::FxReturnStatement(FxVMFunctionCall *call, const FScriptPositi
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FxReturnStatement::~FxReturnStatement()
|
||||||
|
{
|
||||||
|
SAFE_DELETE(Call);
|
||||||
|
}
|
||||||
|
|
||||||
FxExpression *FxReturnStatement::Resolve(FCompileContext &ctx)
|
FxExpression *FxReturnStatement::Resolve(FCompileContext &ctx)
|
||||||
{
|
{
|
||||||
CHECKRESOLVED();
|
CHECKRESOLVED();
|
||||||
|
|
Loading…
Reference in a new issue