diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/emacs.c b/src/emacs.c index f0d75f5c20d..a2565645c6c 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -450,16 +450,14 @@ real_filename (char *filename) | |||
| 450 | #ifdef WINDOWSNT | 450 | #ifdef WINDOWSNT |
| 451 | /* w32_my_exename resolves symlinks internally, so no need to | 451 | /* w32_my_exename resolves symlinks internally, so no need to |
| 452 | call realpath. */ | 452 | call realpath. */ |
| 453 | real_name = xmalloc (strlen (filename)); | 453 | real_name = xstrdup (filename); |
| 454 | strcpy (real_name, filename); | ||
| 455 | return real_name; | ||
| 456 | #else | 454 | #else |
| 457 | real_name = realpath (filename, NULL); | 455 | real_name = realpath (filename, NULL); |
| 458 | if (!real_name) | 456 | if (!real_name) |
| 459 | fatal ("could not resolve realpath of \"%s\": %s", | 457 | fatal ("could not resolve realpath of \"%s\": %s", |
| 460 | filename, strerror (errno)); | 458 | filename, strerror (errno)); |
| 461 | return real_name; | ||
| 462 | #endif | 459 | #endif |
| 460 | return real_name; | ||
| 463 | } | 461 | } |
| 464 | 462 | ||
| 465 | /* Set `invocation-name' `invocation-directory'. */ | 463 | /* Set `invocation-name' `invocation-directory'. */ |