projects
/
platform
/
upstream
/
glslang.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58d6905
)
Fixup leak of TString
author
Dan Sinclair
<dsinclair@chromium.org>
Wed, 20 Feb 2019 21:40:13 +0000
(16:40 -0500)
committer
Dan Sinclair
<dsinclair@chromium.org>
Wed, 20 Feb 2019 21:40:13 +0000
(16:40 -0500)
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.
hlsl/hlslParseHelper.cpp
patch
|
blob
|
history
diff --git
a/hlsl/hlslParseHelper.cpp
b/hlsl/hlslParseHelper.cpp
index c313372228b800d59472918d66e43f4c2fe58ed4..213f236d028addc8e5533fa3e8a9a9d8ef0848cc 100644
(file)
--- 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(
NewPool
TString(name), type);
symbolTable.insert(*variable);