From 5538e539d24c9b4e27db59baa4b11b3ea3100911 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Tue, 31 Jan 2023 17:11:54 +0000 Subject: [PATCH] Minor optimisation. --- src/devices/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/devices/file.c b/src/devices/file.c index 7289d1f..eb9871d 100644 --- a/src/devices/file.c +++ b/src/devices/file.c @@ -140,10 +140,7 @@ retry_realpath(const char *file_name) else return NULL; } - x = malloc(strlen(r) + 1); - strcpy(x, r); - free(r); - return x; + return r; } static void