Kaydet (Commit) b380c824 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid manual malloc/free

Change-Id: I7420dfde91ab52316139b446ea5c5aac79ed2350
Reviewed-on: https://gerrit.libreoffice.org/71380
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 719d81a6
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment