From 39b101b13da171a0ba08ae7196d1a88bc8375ef7 Mon Sep 17 00:00:00 2001 From: Ethan Nicholas Date: Wed, 1 Mar 2017 12:07:28 -0500 Subject: fix leak in SPIRV code generator BUG=skia:6101 Change-Id: Ic083becfb44e36b029ef9511825f4a681b7495f4 Reviewed-on: https://skia-review.googlesource.com/9103 Reviewed-by: Greg Daniel Commit-Queue: Ethan Nicholas --- src/sksl/SkSLSPIRVCodeGenerator.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sksl') diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp index 2da63da3e4..85e996c031 100644 --- a/src/sksl/SkSLSPIRVCodeGenerator.cpp +++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp @@ -2540,6 +2540,9 @@ SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) { 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; } -- cgit v1.2.3