DiscussionsIssue archiveOCCT:Visualization

Archived issue #0022955

Memory leak in OpenGL_text.cxx

CommunityOCCT:Visualizationclosed3 public notes

Search issues

Description

In line 155, if allocation of 'wstr' fails the method returns without deleting the 'data' variable

Solution:

if( !wstr )
  {
    delete data;
    return TFailure;
  }

Public activity

3 archived notes

Participants are labeled by their role within this record.

01Commenter 1
To be checked after integration of #0022819
02Commenter 2
By default 'new wchar_t[i]' will raise an exception on allocation error. So NULL-check is useless here and never happens. NULL-check is removed in #0022819.
03Author
Verified. Please close.

Related records