X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fconfigurator%2Fconfigurator.c;h=f830cbca14eb3eb3a2f4070fc6564674a0428d2d;hb=172a3affa2afe06a08646e9bec593ec5a6e73fff;hp=57779f29905b68d82e537e8c4f0c49c2d282ebec;hpb=52b86922f8466e4641b55ba17eab56522b46e6f4;p=ccan diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index 57779f29..f830cbca 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -797,12 +797,12 @@ static bool run_test(const char *cmd, const char *wrapper, struct test *test) /* We run INSIDE_MAIN tests for sanity checking. */ if (strstr(test->style, "EXECUTE") || strstr(test->style, "INSIDE_MAIN")) { - char *cmd = malloc(strlen(wrapper) + strlen(" ." DIR_SEP OUTPUT_FILE) + 1); + char *runcmd = malloc(strlen(wrapper) + strlen(" ." DIR_SEP OUTPUT_FILE) + 1); - strcpy(cmd, wrapper); - strcat(cmd, " ." DIR_SEP OUTPUT_FILE); - output = run(cmd, &status); - free(cmd); + strcpy(runcmd, wrapper); + strcat(runcmd, " ." DIR_SEP OUTPUT_FILE); + output = run(runcmd, &status); + free(runcmd); if (!strstr(test->style, "EXECUTE") && status != 0) c12r_errx(EXIT_BAD_TEST, "Test for %s failed with %i:\n%s",