Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7084 closed Bugs (fixed)

memory leak in fileiter.cpp

Reported by: Gaurav Gupta <g.gupta@…> Owned by: John Maddock
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.

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

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

Attachment: fileiter.cpp_patch added

Fix for the reported Bug.

comment:1 Changed 6 years ago by John Maddock

Resolution: fixed
Status: newclosed

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

comment:2 Changed 6 years ago by John Maddock

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.