Hello James,
While analysing find utility using valgrind the following memory
leak was detected.
==9767== LEAK SUMMARY:
==9767== definitely lost: 120 bytes in 10 blocks.
On further analysis, found that the dirinfo structure is not getting cleaned up
after use
and resulting in memory leak. Cleaning up of dirinfo pointer resolves this.
Please find
the patch for this attached. This diff is prepared over the current release of
findutils,
findutils-4.2.29.
Thanks & Rgds, Supriya
--- lib/savedirinfo.c 2005-07-02 15:24:34.000000000 +0530
+++ lib/savedirinfo.c.mod 2007-02-09 15:48:07.000000000 +0530
@@ -253,6 +253,8 @@ void free_dirinfo(struct savedir_dirinfo
p->entries = NULL;
free(p->buffer);
p->buffer = NULL;
+ free(p);
+ p = NULL;
}
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils