summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/emfreader.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 574858ccd67d..51a8a6fb029b 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -406,9 +406,9 @@ namespace emfio
mbEMFPlus = true;
sal_uInt64 const pos = mpInputStream->Tell();
- void *buffer = malloc( length );
- PassEMFPlus( buffer, mpInputStream->ReadBytes(buffer, length) );
- free( buffer );
+ auto buffer = std::make_unique<char[]>( length );
+ PassEMFPlus( buffer.get(), mpInputStream->ReadBytes(buffer.get(), length) );
+ buffer.reset();
mpInputStream->Seek( pos );
bHaveDC = false;