diff options
| author | Lars Ingebrigtsen | 2021-07-24 18:09:14 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-24 18:09:14 +0200 |
| commit | 6becc97433cc7caeae462df56c5ed5660fefe232 (patch) | |
| tree | 8838df448de324051b3598d71dd082b21a7eaace /src | |
| parent | ba918ecb7891c6d0bb7bbaab93b4316881166d94 (diff) | |
| download | emacs-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.c | 4 |
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; |