Skip to content

Commit

Permalink
Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 15, 2021
1 parent ebfd379 commit 61f2fb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/intern/dwgreader21.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ bool dwgReader21::readFileHeader() {
duint8 *SectionsMapData = new duint8[SectionsMapSizeUncompressed];
dwgPageInfo sectionMap = sectionPageMapTmp[SectionsMapId];
ret = parseSysPage(SectionsMapSizeCompressed, SectionsMapSizeUncompressed, SectionsMapCorrectionFactor, sectionMap.address, SectionsMapData);
if (!ret)
if (!ret) {
delete[]SectionsMapData;
return false;
}

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

0 comments on commit 61f2fb9

Please sign in to comment.