summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-23 02:01:03 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-23 02:50:42 +0200
commita1e7915bfec4b9e006a0fc4c6819b63b139af2f0 (patch)
treef9c9e2da671b6e133a25ea86f0d69d6e3b96ee0d /vcl/source/opengl
parent5b37884d57398d4c11524f6d1ec92e032bb46d40 (diff)
Lsan: fix memory leak
Change-Id: Id8adb7517960a33f9900cb773b62b84db71e795a
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 50d5799d7797..bace47b7bc33 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -38,14 +38,14 @@ OString loadShader(const OUString& rFilename)
{
sal_uInt64 nSize = 0;
aFile.getSize(nSize);
- char* content = new char[nSize+1];
+ boost::scoped_array<char> content(new char[nSize+1]);
sal_uInt64 nBytesRead = 0;
- aFile.read(content, nSize, nBytesRead);
+ aFile.read(content.get(), nSize, nBytesRead);
if(nSize != nBytesRead)
assert(false);
content[nSize] = 0;
- return OString(content);
+ return OString(content.get());
}
else
{