From: Dan Sinclair Date: Wed, 20 Feb 2019 21:40:13 +0000 (-0500) Subject: Fixup leak of TString X-Git-Tag: upstream/11.4.0~527^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0560138e667ce4f9d592cc8eaf037219fb7e8f0e;p=platform%2Fupstream%2Fglslang.git Fixup leak of TString In decomposeIntrinsic a new TString was being allocated and passed into a TVariable. That string was leaking. This CL converts the new TString to call NewPoolTString to allocate from the TString pool. --- diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index c313372..213f236 100644 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -4607,7 +4607,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*& if (nullptr == symbol) { type.getQualifier().builtIn = builtin; - TVariable* variable = new TVariable(new TString(name), type); + TVariable* variable = new TVariable(NewPoolTString(name), type); symbolTable.insert(*variable);