]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
copy: remove unnecessary ‘free’
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Jan 2022 19:24:35 +0000 (11:24 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 27 Jan 2022 21:04:14 +0000 (13:04 -0800)
* src/copy.c (copy_reg): Remove a ‘free’ call that does nothing
because its argument is always a null pointer, starting with
2007-11-1608:31:15Z!jim@meyering.net.

src/copy.c

index 753d6ccd98ba5a4841911810f76debe790711228..b2e3cb1f76efc7a9b60684f63689f49b48c224e4 100644 (file)
@@ -1078,7 +1078,6 @@ copy_reg (char const *src_name, char const *dst_name,
 {
   char *buf;
   char *buf_alloc = NULL;
-  char *name_alloc = NULL;
   int dest_desc;
   int dest_errno;
   int source_desc;
@@ -1459,7 +1458,6 @@ close_src_desc:
     }
 
   free (buf_alloc);
-  free (name_alloc);
   return return_val;
 }