rem: if (new_dest == NULL) xalloc_die ();
context: movefile (char *source, char *dest, int dest_is_dir,	  const struct cp_options *x){  int dest_had_trailing_slash = strip_trailing_slashes (dest);  int fail;  /* This code was introduced to handle the ambiguity in the semantics     of mv that is induced by the varying semantics of the rename function.     Some systems (e.g., Linux) have a rename function that honors a     trailing slash, while others (like Solaris 5,6,7) have a rename     function that ignores a trailing slash.  I believe the Linux     rename semantics are POSIX and susv2 compliant.  */  if (remove_trailing_slashes)    strip_trailing_slashes (source);  /* In addition to when DEST is a directory, if DEST has a trailing     slash and neither SOURCE nor DEST is a directory, presume the target     is DEST/`basename source`.  This converts `mv x y/' to `mv x y/x'.     This change means that the command `mv any file/' will now fail     rather than performing the move.  The case when SOURCE is a     directory and DEST is not is properly diagnosed by do_move.  */  if (dest_is_dir || (dest_had_trailing_slash && !is_real_dir (source)))    {      /* DEST is a directory; build full target filename. */      char const *src_basename = base_name (source);      char *new_dest = path_concat (dest, src_basename, NULL);      if (new_dest == NULL)	xalloc_die ();      strip_trailing_slashes (new_dest);      fail = do_move (source, new_dest, x);      free (new_dest);    }  else    {      fail = do_move (source, dest, x);    }  return fail;}