diff options
author | Jim Meyering <meyering@redhat.com> | 2008-01-07 17:10:07 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-01-07 17:10:07 +0100 |
commit | b84880d980d85dc68a1d43fec3ea4f18fd3feeda (patch) | |
tree | 4929f6768baa813672b3ee71d2ef5825a2c6d193 /src | |
parent | 2deb4bd589701dbfeeb2fcd6552d21b9f11e11b4 (diff) | |
download | coreutils-b84880d980d85dc68a1d43fec3ea4f18fd3feeda.tar.xz |
cp (but not copy.c): plug a small leak.
* src/cp.c (do_copy) [--parents]: Free the attribute list.
Diffstat (limited to 'src')
-rw-r--r-- | src/cp.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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); } } |