diff options
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 994a7b111ab7..4710b544d616 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3715,12 +3715,10 @@ void WW8Export::RestoreMacroCmds() pFib->m_lcbCmds = pStream->Tell(); pStream->Seek(0); - sal_uInt8 *pBuffer = new sal_uInt8[pFib->m_lcbCmds]; - bool bReadOk = checkRead(*pStream, pBuffer, pFib->m_lcbCmds); + std::unique_ptr<sal_uInt8[]> pBuffer( new sal_uInt8[pFib->m_lcbCmds] ); + bool bReadOk = checkRead(*pStream, pBuffer.get(), pFib->m_lcbCmds); if (bReadOk) - pTableStrm->WriteBytes(pBuffer, pFib->m_lcbCmds); - delete[] pBuffer; - + pTableStrm->WriteBytes(pBuffer.get(), pFib->m_lcbCmds); } delete pStream; |