summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
284b3e6)
These leaks aren't really an issue since they are completely bounded,
but if one is building with leak sanitizer enabled (as
-fsanitize=address does in gcc-5.1), it kills the configurator, which
isn't very useful for us. Add the few free() calls it's looking for.
This is not an actual code issue, they just workaround
some optional compiler peculiarities.
Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (split off leak change)
test->done = true;
return test->answer;
}
test->done = true;
return test->answer;
}
+ if (deps[len])
+ free(dep);
+
deps += len;
deps += strspn(deps, " ");
}
deps += len;
deps += strspn(deps, " ");
}
cmd = connect_args(argv, " -o " OUTPUT_FILE " " INPUT_FILE);
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
run_test(cmd, &tests[i]);
cmd = connect_args(argv, " -o " OUTPUT_FILE " " INPUT_FILE);
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
run_test(cmd, &tests[i]);
unlink(OUTPUT_FILE);
unlink(INPUT_FILE);
unlink(OUTPUT_FILE);
unlink(INPUT_FILE);
printf("#define _GNU_SOURCE /* Always use GNU extensions. */\n");
printf("#endif\n");
printf("#define CCAN_COMPILER \"%s\"\n", argv[1]);
printf("#define _GNU_SOURCE /* Always use GNU extensions. */\n");
printf("#endif\n");
printf("#define CCAN_COMPILER \"%s\"\n", argv[1]);
- printf("#define CCAN_CFLAGS \"%s\"\n\n", connect_args(argv+1, ""));
+ cmd = connect_args(argv+1, "");
+ printf("#define CCAN_CFLAGS \"%s\"\n\n", cmd);
+ free(cmd);
/* This one implies "#include <ccan/..." works, eg. for tdb2.h */
printf("#define HAVE_CCAN 1\n");
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
/* This one implies "#include <ccan/..." works, eg. for tdb2.h */
printf("#define HAVE_CCAN 1\n");
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)