X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=execute.c;fp=execute.c;h=07fd30f4e26f2d282032e4702e42cdecb8ee910a;hb=da0ee5e7efab316635f59d212028844f848fa6ce;hp=cc01c436db2329e19184a7d651b3fe5e06efe5aa;hpb=7980e4108be1dff9b074aa91b97c8d787df41d83;p=fips diff --git a/execute.c b/execute.c index cc01c43..07fd30f 100644 --- a/execute.c +++ b/execute.c @@ -36,6 +36,7 @@ #include #include "execute.h" +#include "xmalloc.h" /* Terminate a string representing a filename at the final '/' to * eliminate the final filename component, (leaving only the directory @@ -294,11 +295,7 @@ execute_with_fips_preload (int argc, char * const argv[]) char **execvp_args; int i; - execvp_args = malloc((argc + 1) * sizeof(char *)); - if (execvp_args == NULL) { - fprintf (stderr, "Out of memory,\n"); - return 1; - } + execvp_args = xmalloc((argc + 1) * sizeof(char *)); for (i = 0; i < argc; i++) { execvp_args[i] = argv[i];