mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-01 09:12:35 +00:00
No need to copy that argument.
The copy also lacked the NUL terminator, wouldn't surprise me if it crashed. Let's just clean it up.
This commit is contained in:
parent
43c8fc50be
commit
b4c6831b56
@ -2187,12 +2187,7 @@ static bool frontend_linux_set_fork(enum frontend_fork fork_mode)
|
||||
|
||||
static void frontend_linux_exec(const char *path, bool should_load_game)
|
||||
{
|
||||
char *newargv[] = { NULL, NULL };
|
||||
size_t len = strlen(path);
|
||||
|
||||
newargv[0] = malloc(len);
|
||||
|
||||
strlcpy(newargv[0], path, len);
|
||||
const char *newargv[] = { path, NULL };
|
||||
|
||||
execv(path, newargv);
|
||||
perror("execv");
|
||||
|
Loading…
x
Reference in New Issue
Block a user