Commit 0560138e by Dan Sinclair

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.
parent 58d6905e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment