From edadbed6fbd9e76a4d46980fcdf5ccad8a97b4bd Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 16 Jan 2019 16:55:03 -0500 Subject: [PATCH] HLSL: Avoid leaking a shadow sampler struct --- hlsl/hlslParseHelper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index 72edbd7..9fd1b26 100644 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -39,6 +39,7 @@ #include "hlslGrammar.h" #include "hlslAttributes.h" +#include "../glslang/Include/Common.h" #include "../glslang/MachineIndependent/Scan.h" #include "../glslang/MachineIndependent/preprocessor/PpContext.h" @@ -3129,7 +3130,7 @@ TIntermAggregate* HlslParseContext::handleSamplerTextureCombine(const TSourceLoc if (textureShadowEntry != textureShadowVariant.end()) newId = textureShadowEntry->second->get(shadowMode); else - textureShadowVariant[texSymbol->getId()] = new tShadowTextureSymbols; + textureShadowVariant[texSymbol->getId()] = NewPoolObject(tShadowTextureSymbols(), 1); // Sometimes we have to create another symbol (if this texture has been seen before, // and we haven't created the form for this shadow mode). -- 2.7.4