bugfindutils - Bugs: bug #20662, memory leak from gnulib dirname...

 
 

bug #20662: memory leak from gnulib dirname module

Submitted by:  Eric Blake <ericb>
Submitted on:  Thu 02 Aug 2007 12:57:20 PM UTC  
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  Eric Blake <ericb>
Originator Name:  Eric Blake Open/Closed:  Closed
Release:  4.2.28 Fixed Release:  4.3.9

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 Aug 2007 12:57:20 PM UTC, original submission:  

In July 2006, gnulib changed the dirname module so that base_name started returning a malloc'd result, for similarity with dir_name, and added last_component as the replacement that did not malloc.

That means the following constructs in CVS head now leak memory (and similar constructs are on the 4.2.x branch), since 4.2.28 and 4.3.1:

./find/find.c:  char *base = base_name(pathname);
./find/pred.c:   checked_print_quoted (dest, segment->text, base_name (pathname));
./find/pred.c:  base = base_name (pathname);
./find/pred.c:  base = base_name (pathname);
./locate/locate.c:  procdata->munged_filename = base_name(procdata->original_filename);

They should either free the memory, or use s/base_name/last_component/.

Eric Blake <ericb>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Updated the item)
  • -email is unavailable- added by ericb (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-11 jay Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.3.9
    2007-08-05 ericb StatusIn Progress => Fixed

    Back to the top


    Powered by Savane 3.6