commit | 39b101b13da171a0ba08ae7196d1a88bc8375ef7 | [log] [tgz] |
---|---|---|
author | Ethan Nicholas <ethannicholas@google.com> | Wed Mar 01 12:07:28 2017 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Thu Mar 02 14:23:57 2017 +0000 |
tree | c7156fd8154224063d41c75cfa90373102e9db5b | |
parent | 30f2ec82b897c660fc71b04845829b42dd7bb7d4 [diff] [blame] |
fix leak in SPIRV code generator BUG=skia:6101 Change-Id: Ic083becfb44e36b029ef9511825f4a681b7495f4 Reviewed-on: https://skia-review.googlesource.com/9103 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp index 2da63da..85e996c 100644 --- a/src/sksl/SkSLSPIRVCodeGenerator.cpp +++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -2540,6 +2540,9 @@ this->writeInstruction(SpvOpVariable, ptrType, result, storageClass, fConstantBuffer); this->writeLayout(intf.fVariable.fModifiers.fLayout, result); fVariableMap[&intf.fVariable] = result; + if (fProgram.fInputs.fRTHeight) { + delete type; + } return result; }