summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-10-18 08:13:28 +0000
committerJim Meyering <jim@meyering.net>2001-10-18 08:13:28 +0000
commit493d1adca128114d79876b00d7c0ac2ef16ed228 (patch)
tree533b4697469c9b64c85e58ea582a51e9ccc18d8c /src
parent6a03579aa48e4ba536848a0e75dc185cc930d4bd (diff)
downloadcoreutils-493d1adca128114d79876b00d7c0ac2ef16ed228.tar.xz
(movefile): Now that remember_copied xstrdup's the file name, free `new_dest'.
Diffstat (limited to 'src')
-rw-r--r--src/mv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mv.c b/src/mv.c
index 927b14ece..f235dca9c 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -307,9 +307,7 @@ movefile (char *source, char *dest, int dest_is_dir,
if (new_dest == NULL)
xalloc_die ();
fail = do_move (source, new_dest, x);
-
- /* Do not free new_dest. It may have been squirreled away by
- the remember_copied function. */
+ free (new_dest);
}
else
{