Unverified Commit 7f2a87e5 by John Kessenich Committed by GitHub

Merge pull request #1661 from dneto0/fix-leak

Avoid leaking name for counter buffer
parents 4c096c52 806e0573
...@@ -3208,7 +3208,7 @@ void HlslParseContext::declareStructBufferCounter(const TSourceLoc& loc, const T ...@@ -3208,7 +3208,7 @@ void HlslParseContext::declareStructBufferCounter(const TSourceLoc& loc, const T
TType blockType; TType blockType;
counterBufferType(loc, blockType); counterBufferType(loc, blockType);
TString* blockName = new TString(intermediate.addCounterBufferName(name)); TString* blockName = NewPoolTString(intermediate.addCounterBufferName(name).c_str());
// Counter buffer is not yet in use // Counter buffer is not yet in use
structBufferCounter[*blockName] = false; structBufferCounter[*blockName] = false;
......
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