URL:
<http://savannah.gnu.org/bugs/?20662>
Summary: memory leak from gnulib dirname module
Project: findutils
Submitted by: ericb
Submitted on: Thursday 08/02/2007 at 06:57
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: In Progress
Privacy: Public
Assigned to: ericb
Originator Name: Eric Blake
Originator Email: [EMAIL PROTECTED]
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.28
Fixed Release: None
_______________________________________________________
Details:
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/.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?20662>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils