]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/tests_pass_valgrind.c
autodata: stash pointers in a binary.
[ccan] / tools / ccanlint / tests / tests_pass_valgrind.c
index 818143777e2571e934bc59e98d215a1b3bf7bfcf..8ccdad963ee072e88a32400ce3b3cba9f29ff987 100644 (file)
@@ -146,7 +146,6 @@ static const char *concat(struct score *score, char *bits[])
 
 /* FIXME: Run examples, too! */
 static void do_run_tests_vg(struct manifest *m,
-                           bool keep,
                            unsigned int *timeleft,
                            struct score *score)
 {
@@ -165,11 +164,10 @@ static void do_run_tests_vg(struct manifest *m,
                        options = concat(score,
                                         per_file_options(&tests_pass_valgrind,
                                                          i));
-                       if (streq(options, "FAIL"))
+                       if (streq(options, "FAIL")) {
+                               i->leak_info = NULL;
                                continue;
-
-                       if (keep)
-                               talloc_set_destructor(i->valgrind_log, NULL);
+                       }
 
                        output = grab_file(i, i->valgrind_log, NULL);
                        /* No valgrind errors? */
@@ -189,7 +187,6 @@ static void do_run_tests_vg(struct manifest *m,
 }
 
 static void do_leakcheck_vg(struct manifest *m,
-                           bool keep,
                            unsigned int *timeleft,
                            struct score *score)
 {