diff options
-rw-r--r-- | gnu/usr.bin/cvs/src/server.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/usr.bin/cvs/src/server.c b/gnu/usr.bin/cvs/src/server.c index 762a6d72438..4a61b1dbf14 100644 --- a/gnu/usr.bin/cvs/src/server.c +++ b/gnu/usr.bin/cvs/src/server.c @@ -977,9 +977,6 @@ dirswitch (dir, repos) return; } - if (dir_name != NULL) - free (dir_name); - dir_len = strlen (dir); /* Check for a trailing '/'. This is not ISDIRSEP because \ in the @@ -995,6 +992,9 @@ dirswitch (dir, repos) return; } + if (dir_name != NULL) + free (dir_name); + dir_name = malloc (strlen (server_temp_dir) + dir_len + 40); if (dir_name == NULL) { |