summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cp.c b/src/cp.c
index be3701fc8..01d98cc64 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -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);
}
}