mirror of
https://github.com/tmux/tmux.git
synced 2026-07-22 08:51:17 +00:00
Copy the home directory if it comes from getpwuid.
This commit is contained in:
4
tmux.c
4
tmux.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tmux.c,v 1.221 2026/06/29 18:17:28 nicm Exp $ */
|
||||
/* $OpenBSD: tmux.c,v 1.222 2026/07/19 19:09:30 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -360,7 +360,7 @@ find_home(void)
|
||||
if (home == NULL || *home == '\0') {
|
||||
pw = getpwuid(getuid());
|
||||
if (pw != NULL)
|
||||
home = pw->pw_dir;
|
||||
home = xstrdup(pw->pw_dir);
|
||||
else
|
||||
home = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user