/* Note: we already test safe_mode in run_tests.c */
static const char *can_run_vg(struct manifest *m)
/* Note: we already test safe_mode in run_tests.c */
static const char *can_run_vg(struct manifest *m)
static char *get_leaks(const char *output, char **errs)
{
char *leaks = talloc_strdup(output, "");
static char *get_leaks(const char *output, char **errs)
{
char *leaks = talloc_strdup(output, "");
- unsigned int i, num;
- char **lines = strsplit(output, output, "\n", &num);
+ unsigned int i;
+ char **lines = strsplit(output, output, "\n");
if (strstr(lines[i], " lost ")) {
/* A leak... */
if (strstr(lines[i], " definitely lost ")) {
if (strstr(lines[i], " lost ")) {
/* A leak... */
if (strstr(lines[i], " definitely lost ")) {
i->compiled);
output = grab_file(i, "valgrind.log", NULL);
if (!output || output[0] == '\0') {
i->compiled);
output = grab_file(i, "valgrind.log", NULL);
if (!output || output[0] == '\0') {
first = list_top(&score->per_file_errors, struct file_error, list);
command = talloc_asprintf(m, "valgrind --db-attach=yes%s %s",
first = list_top(&score->per_file_errors, struct file_error, list);
command = talloc_asprintf(m, "valgrind --db-attach=yes%s %s",
struct ccanlint tests_pass_valgrind_noleaks = {
.key = "tests_pass_valgrind_noleaks",
.name = "Module's run and api tests have no memory leaks",
struct ccanlint tests_pass_valgrind_noleaks = {
.key = "tests_pass_valgrind_noleaks",
.name = "Module's run and api tests have no memory leaks",