From 412211887e611bd51a2b3288e311133a41cad3db Mon Sep 17 00:00:00 2001 From: Manoj Gupta Date: Tue, 1 Nov 2016 17:30:24 -0700 Subject: [PATCH] Fix clang static analyzer warnings. frameworks/native/cmds/flatland/GLHelper.cpp:366:9: warning: Potential leak of memory pointed to by 'src' Test: Warning no longer appears Change-Id: I2721d292cf1f387f34fb2e69f8370f1abff3f01f --- cmds/flatland/GLHelper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds/flatland/GLHelper.cpp b/cmds/flatland/GLHelper.cpp index ddf3aa8686..5c04f6cf19 100644 --- a/cmds/flatland/GLHelper.cpp +++ b/cmds/flatland/GLHelper.cpp @@ -365,6 +365,7 @@ static bool compileShaderLines(GLenum shaderType, const char* const* lines, if (!result) { fprintf(stderr, "Shader source:\n"); printShaderSource(lines); + delete[] src; return false; } delete[] src;