Avoid using exiting allocators in the front end.
This commit is contained in:
@@ -41,7 +41,6 @@
|
||||
#include "sudo_gettext.h" /* must be included before sudo_compat.h */
|
||||
|
||||
#include "sudo_compat.h"
|
||||
#include "sudo_alloc.h"
|
||||
#include "sudo_fatal.h"
|
||||
#include "sudo_conf.h"
|
||||
#include "sudo_debug.h"
|
||||
@@ -98,7 +97,8 @@ main(int argc, char *argv[], char *envp[])
|
||||
/* Shift argv and make a copy of the command to execute. */
|
||||
argv++;
|
||||
argc--;
|
||||
cmnd = sudo_estrdup(argv[0]);
|
||||
if ((cmnd = strdup(argv[0])) == NULL)
|
||||
sudo_fatalx(U_("unable to allocate memory"));
|
||||
|
||||
/* If invoked as a login shell, modify argv[0] accordingly. */
|
||||
if (login_shell) {
|
||||
|
Reference in New Issue
Block a user