diff options
Diffstat (limited to 'sw/source/filter/ww8/wrtw8esh.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 9f50c201a7b1..2b8a8b24a277 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -275,10 +275,9 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFo sal_uInt32 const nLen = tmpStrm.remainingSize(); if(nLen >0) { - sal_uInt8* pBuffer = new sal_uInt8[ nLen ]; - tmpStrm.ReadBytes(pBuffer, nLen); - rStrm.WriteBytes(pBuffer, nLen); - delete[] pBuffer; + std::unique_ptr<sal_uInt8[]> pBuffer( new sal_uInt8[ nLen ] ); + tmpStrm.ReadBytes(pBuffer.get(), nLen); + rStrm.WriteBytes(pBuffer.get(), nLen); } } void SwBasicEscherEx::PreWriteHyperlinkWithinFly(const SwFrameFormat& rFormat,EscherPropertyContainer& rPropOpt) |