DiscussionsIssue archiveOCCT:Foundation Classes

Archived issue #0022774

Memory leak in OSD_FontMgr::InitFontDataBase() method

Open CASCADEOCCT:Foundation Classesclosed6 public notes

Search issues

Description

There are two variables "windir_var" and "font_dir" in OSD_FontMgr::InitFontDataBase() method that are allocated with "new" operator. But delete operator is not called for both. It causes the memory leak.
This bug was detected with help of Intel parallel inspector.

Public activity

6 archived notes

Participants are labeled by their role within this record.

01Author
Branch http://svn/svn/occt/branches/0022774 is ready to be reviewed.
02Commenter 2
Code review remark: please revise the fix so as to use C++ classes (OSD_Environment, TCollection_HAsciiString) instead of plain C code. This will make code simpler and safer, and shall help to recognize and handle better special cases as e.g. if variable WinDir is not defined.
03Author
Remarks were taking into account. The new version is ready to be reviewed.
04Commenter 4
No remarks, please test
05Commenter 5
Dear Commenter 1,
Workbench KAS:dev:mkv-22774-occt was created from SVN branch http://svn/svn/occt/branches/0022774
(and mkv-22774-products from trunk) and compiled on Linux platform.

There are not regressions in mkv-22774-products regarding to KAS:dev:products-20111216-opt

See results in /QADisk/occttests/results/KAS/dev/mkv-22774-products_21122011/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20111216-opt_17122011/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification
06Commenter 1
Integrated into trunk of occt repository

Date: 2011-12-23 10:31:56 +0400 (Fri, 23 Dec 2011)
New Revision: 9851

Modified:
   trunk/src/OSD/OSD_FontMgr.cxx