forked from amazingfate/loongoffice
ofz#3160 Direct-leak
Change-Id: I6dcc35aaa06c2599a4524194e5e633cd4e36474e Reviewed-on: https://gerrit.libreoffice.org/41634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
|
||||
#include <comphelper/newarray.hxx>
|
||||
|
||||
#include <assert.h>
|
||||
#include <list>
|
||||
|
||||
#include "hwpfile.h"
|
||||
@ -459,12 +460,14 @@ bool Picture::Read(HWPFile & hwpf)
|
||||
|
||||
if (pictype == PICTYPE_DRAW)
|
||||
{
|
||||
hmem = new HMemIODev(reinterpret_cast<char *>(follow.data()), follow_block_size);
|
||||
HMemIODev* pOldMem = hmem;
|
||||
HMemIODev* pNewMem = new HMemIODev(reinterpret_cast<char *>(follow.data()), follow_block_size);
|
||||
hmem = pNewMem;
|
||||
LoadDrawingObjectBlock(this);
|
||||
style.cell = picinfo.picdraw.hdo;
|
||||
delete hmem;
|
||||
|
||||
hmem = nullptr;
|
||||
assert(hmem == pNewMem);
|
||||
delete pNewMem;
|
||||
hmem = pOldMem;
|
||||
}
|
||||
else if (follow_block_size >= 4)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user