Ticket #7084 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 years ago

memory leak in fileiter.cpp

Reported by: Gaurav Gupta <g.gupta@…> Owned by: johnmaddock
Milestone: To Be Determined Component: regex
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc: yogen.saini@…


In file libs/regex/src/fileiter.cpp

In case the opendir is successful but if condition fails in following code block then there will be memory leak.

DIR* h = opendir(dat->root);
   dat->d = h;
   if(h != 0)
      if(_fi_FindNextFile(dat, lpFindFileData))
         return dat;
   delete dat;
   return 0;

The attached patch is the fix for this situation.


fileiter.cpp_patch Download (366 bytes) - added by Gaurav Gupta <g.gupta@…> 5 years ago.
Fix for the reported Bug.

Change History

Changed 5 years ago by Gaurav Gupta <g.gupta@…>

Fix for the reported Bug.

comment:1 Changed 5 years ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed

(In [79338]) Fix potential memory leak. Fixes #7084.

comment:2 Changed 5 years ago by johnmaddock

(In [79556]) Merge collected bug fixes from Trunk: Refs #589. Refs #7032. Refs #7084. Refs #6346.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.