tests: cleanup issues found by valgrind
diff --git a/tests/vktestframework.cpp b/tests/vktestframework.cpp
index 0d88091..2be27ea 100644
--- a/tests/vktestframework.cpp
+++ b/tests/vktestframework.cpp
@@ -1237,7 +1237,7 @@
}
if (config == 0) {
- config = new char[strlen(DefaultConfig) + 1];
+ config = (char *) alloca(strlen(DefaultConfig) + 1);
strcpy(config, DefaultConfig);
}
@@ -1600,7 +1600,7 @@
const char *pshader,
std::vector<unsigned int> &spirv)
{
- glslang::TProgram& program = *new glslang::TProgram;
+ glslang::TProgram program;
const char *shaderStrings[1];
// TODO: Do we want to load a special config file depending on the
@@ -1667,6 +1667,7 @@
spv::spirvbin_t(0).remap(spirv, spv::spirvbin_t::DO_EVERYTHING);
}
+ delete shader;
return true;
}