Skip to content

Commit 61f2fb9

Browse files
committed
Fix memory leak
1 parent ebfd379 commit 61f2fb9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/intern/dwgreader21.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,10 @@ bool dwgReader21::readFileHeader() {
260260
duint8 *SectionsMapData = new duint8[SectionsMapSizeUncompressed];
261261
dwgPageInfo sectionMap = sectionPageMapTmp[SectionsMapId];
262262
ret = parseSysPage(SectionsMapSizeCompressed, SectionsMapSizeUncompressed, SectionsMapCorrectionFactor, sectionMap.address, SectionsMapData);
263-
if (!ret)
263+
if (!ret) {
264+
delete[]SectionsMapData;
264265
return false;
266+
}
265267

266268
//reads sections:
267269
//Note: compressed value are not stored in file then, commpresed field are use to store

0 commit comments

Comments
 (0)