Infrastructure: remove potential memory leaks.
authorJohn Kessenich <cepheus@frii.com>
Thu, 19 Jan 2017 22:29:25 +0000 (15:29 -0700)
committerJohn Kessenich <cepheus@frii.com>
Thu, 19 Jan 2017 22:30:56 +0000 (15:30 -0700)
glslang/Include/revision.h
glslang/MachineIndependent/ParseHelper.cpp
hlsl/hlslParseHelper.cpp

index 64f0f1f..5ef393d 100644 (file)
@@ -2,5 +2,5 @@
 // For the version, it uses the latest git tag followed by the number of commits.
 // For the date, it uses the current date (when then script is run).
 
-#define GLSLANG_REVISION "Overload400-PrecQual.1772"
-#define GLSLANG_DATE "18-Jan-2017"
+#define GLSLANG_REVISION "Overload400-PrecQual.1773"
+#define GLSLANG_DATE "19-Jan-2017"
index b0ac3bb..29c5c9f 100644 (file)
@@ -4989,7 +4989,7 @@ void TParseContext::inheritGlobalDefaults(TQualifier& dst) const
 //
 TVariable* TParseContext::makeInternalVariable(const char* name, const TType& type) const
 {
-    TString* nameString = new TString(name);
+    TString* nameString = NewPoolTString(name);
     TVariable* variable = new TVariable(nameString, type);
     symbolTable.makeInternalVariable(*variable);
 
index 45df546..bb27455 100755 (executable)
@@ -5474,7 +5474,7 @@ void HlslParseContext::inheritGlobalDefaults(TQualifier& dst) const
 //
 TVariable* HlslParseContext::makeInternalVariable(const char* name, const TType& type) const
 {
-    TString* nameString = new TString(name);
+    TString* nameString = NewPoolTString(name);
     TVariable* variable = new TVariable(nameString, type);
     symbolTable.makeInternalVariable(*variable);
 
@@ -6481,7 +6481,7 @@ void HlslParseContext::renameShaderFunction(TString*& name) const
     // Replace the entry point name given in the shader with the real entry point name,
     // if there is a substitution.
     if (name != nullptr && *name == sourceEntryPointName)
-        name = new TString(intermediate.getEntryPointName().c_str());
+        name = NewPoolTString(intermediate.getEntryPointName().c_str());
 }
 
 // post-processing