From: Todd C. Miller Date: Thu, 2 Jun 1994 21:49:11 +0000 (+0000) Subject: no need to strdup() a constant X-Git-Tag: SUDO_1_3_1~200 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e79c34b9b0faaea6a770e85cdc08a0cd089b458;p=sudo no need to strdup() a constant --- diff --git a/sudo.c b/sudo.c index 8b05e4c8b..dff93ca08 100644 --- a/sudo.c +++ b/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); + } } }