2
0
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:
Todd C. Miller
1994-06-02 21:49:11 +00:00
parent b46f7ee322
commit 9e79c34b9b

10
sudo.c
View File

@@ -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);
}
}
}