diff options
| -rw-r--r-- | libs/hwui/Line.h | 4 | ||||
| -rw-r--r-- | libs/hwui/Patch.cpp | 2 | ||||
| -rw-r--r-- | libs/hwui/Program.cpp | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/libs/hwui/Line.h b/libs/hwui/Line.h index 48e18eb..75f3321e 100644 --- a/libs/hwui/Line.h +++ b/libs/hwui/Line.h @@ -74,8 +74,8 @@ public: ~Line() { delete mPatch; - delete mXDivs; - delete mYDivs; + delete[] mXDivs; + delete[] mYDivs; glDeleteTextures(1, &mTexture); } diff --git a/libs/hwui/Patch.cpp b/libs/hwui/Patch.cpp index 0a6eca3..ca0a0b1 100644 --- a/libs/hwui/Patch.cpp +++ b/libs/hwui/Patch.cpp @@ -34,7 +34,7 @@ Patch::Patch(const uint32_t xCount, const uint32_t yCount) { } Patch::~Patch() { - delete vertices; + delete[] vertices; } /////////////////////////////////////////////////////////////////////////////// diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp index 6528d91..2e1b9a0 100644 --- a/libs/hwui/Program.cpp +++ b/libs/hwui/Program.cpp @@ -46,10 +46,9 @@ Program::Program(const char* vertex, const char* fragment) { GLint infoLen = 0; glGetProgramiv(id, GL_INFO_LOG_LENGTH, &infoLen); if (infoLen > 1) { - char* log = (char*) malloc(sizeof(char) * infoLen); - glGetProgramInfoLog(id, infoLen, 0, log); + GLchar log[infoLen]; + glGetProgramInfoLog(id, infoLen, 0, &log[0]); LOGE("Error while linking shaders: %s", log); - delete log; } glDeleteShader(vertexShader); glDeleteShader(fragmentShader); |
