Modify

Ticket #7084 (closed Bugs: fixed)

Opened 22 months ago

Last modified 22 months 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@…

Description

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.

Attachments

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

Change History

Changed 22 months ago by Gaurav Gupta <g.gupta@…>

Fix for the reported Bug.

comment:1 Changed 22 months ago by johnmaddock

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

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

comment:2 Changed 22 months ago by johnmaddock

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

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.