[PATCH, applied] tools-utils: Fix a memory leak in find_file_under_dir
Dodji Seketeli
dodji@redhat.com
Fri Aug 22 15:28:47 GMT 2025
Hello,
* src/abg-tools-utils.cc (find_file_under_dir): Do not forget to
fts_close the file_hierarchy that was previously fts_open-ed.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to the mainline.
---
src/abg-tools-utils.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/abg-tools-utils.cc b/src/abg-tools-utils.cc
index 0b72d670..97692610 100644
--- a/src/abg-tools-utils.cc
+++ b/src/abg-tools-utils.cc
@@ -2657,6 +2657,7 @@ find_file_under_dir(const string& root_dir,
if (entry_of_file_with_name(entry, file_path_to_look_for, r))
{
result = entry->fts_path;
+ fts_close(file_hierarchy);
return true;
}
// Skip descendents of symbolic links.
--
2.47.1
--
Dodji
More information about the Libabigail
mailing list