aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-07-24 18:09:14 +0200
committerLars Ingebrigtsen2021-07-24 18:09:14 +0200
commit6becc97433cc7caeae462df56c5ed5660fefe232 (patch)
tree8838df448de324051b3598d71dd082b21a7eaace /src
parentba918ecb7891c6d0bb7bbaab93b4316881166d94 (diff)
downloademacs-6becc97433cc7caeae462df56c5ed5660fefe232.tar.gz
emacs-6becc97433cc7caeae462df56c5ed5660fefe232.zip
Tweak Fdirectory_append slightly
* src/fileio.c (Fdirectory_append): Make the xfree condition more robust.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index ddce4723f42..643fc361689 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -827,11 +827,11 @@ usage: (record DIRECTORY &rest COMPONENTS) */)
827 memcpy (p, SSDATA (arg), SBYTES (arg)); 827 memcpy (p, SSDATA (arg), SBYTES (arg));
828 p += SBYTES (arg); 828 p += SBYTES (arg);
829 /* The last element shouldn't have a slash added at the end. */ 829 /* The last element shouldn't have a slash added at the end. */
830 if (i < nargs -1 && !IS_DIRECTORY_SEP (*(p - 1))) 830 if (i < nargs - 1 && !IS_DIRECTORY_SEP (*(p - 1)))
831 *p++ = DIRECTORY_SEP; 831 *p++ = DIRECTORY_SEP;
832 } 832 }
833 833
834 if (multibytes != 0 && multibytes != nargs) 834 if (elements != args)
835 xfree (elements); 835 xfree (elements);
836 836
837 return result; 837 return result;