mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
no need to strdup() a constant
This commit is contained in:
10
sudo.c
10
sudo.c
@@ -294,12 +294,12 @@ static void load_globals()
|
||||
(void) fprintf(stderr, "%s: %s: command not found\n", Argv[0], Argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if ((cmnd = strdup(cmnd)) == NULL) {
|
||||
perror("malloc");
|
||||
(void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
|
||||
exit(1);
|
||||
if ((cmnd = strdup(cmnd)) == NULL) {
|
||||
perror("malloc");
|
||||
(void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user