cp (but not copy.c): plug a small leak.

* src/cp.c (do_copy) [--parents]: Free the attribute list.
This commit is contained in:
Jim Meyering committed 2008-01-07 17:10:07 +01:00
1 parent 2deb4bd589
commit b84880d980
2 files changed
+13

No files matched your search

+3
View File
@@ -1,5 +1,8 @@
2008-01-07 Jim Meyering <meyering@redhat.com>
cp (but not copy.c): plug a small leak.
* src/cp.c (do_copy) [--parents]: Free the attribute list.
Make a racy test failure less likely to happen.
* tests/misc/tty-eof: Uncomment a debug "warn".
This change happens to make this test far less likely to fail.
+10
View File
@@ -683,6 +683,16 @@ do_copy (int n_files, char **file, const char *target_directory,
attr_list, x);
}
if (parents_option)
{
while (attr_list)
{
struct dir_attr *p = attr_list;
attr_list = attr_list->next;
free (p);
}
}
free (dst_name);
}
}