mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
rst: Don't allocate PATH_MAX on stack for proc mountpoint
Use direct name assignment, it's enough. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
da8dbe43bc
commit
dbbd8d400a
@ -968,9 +968,8 @@ static void restore_pgid(void)
|
||||
static int mount_proc(void)
|
||||
{
|
||||
int ret;
|
||||
char proc_mountpoint[PATH_MAX];
|
||||
char proc_mountpoint[] = "crtools-proc.XXXXXX";
|
||||
|
||||
snprintf(proc_mountpoint, sizeof(proc_mountpoint), "crtools-proc.XXXXXX");
|
||||
if (mkdtemp(proc_mountpoint) == NULL) {
|
||||
pr_perror("mkdtemp failed %s", proc_mountpoint);
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user