OSDN Git Service

Fix new[] / delete mismatch.
authorNicolas Capens <capn@google.com>
Wed, 30 May 2018 17:27:12 +0000 (13:27 -0400)
committerNicolas Capens <nicolascapens@google.com>
Wed, 30 May 2018 17:53:13 +0000 (17:53 +0000)
delete[] should be called on memory allocated with new[].

Change-Id: Ic21e270a7aa0e6e15132cbc3c454ea4f1e0222ea
Reviewed-on: https://swiftshader-review.googlesource.com/19048
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
tests/unittests/unittests.cpp

index afbb678..d75d9ba 100644 (file)
@@ -360,7 +360,7 @@ TEST_F(SwiftShaderTest, UnrollLoop)
        EXPECT_GLENUM_EQ(GL_NONE, glGetError());
        EXPECT_EQ(length, written + 1);
        EXPECT_NE(strstr(log, "unrolled"), nullptr);
-       delete log;
+       delete[] log;
 
        glUseProgram(ph.program);