]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/tests_pass_valgrind.c
ccanlint: fix uninitialized variables in tests_pass_valgrind.
[ccan] / tools / ccanlint / tests / tests_pass_valgrind.c
index 64cb29e21c438ef8e1c59fd744188413b395a608..bf914856845f2a7a42e9cec97d210c9b7c3ef06a 100644 (file)
@@ -165,8 +165,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);
@@ -246,7 +248,7 @@ static void run_under_debugger_vg(struct manifest *m, struct score *score)
                                  concat(score,
                                         per_file_options(&tests_pass_valgrind,
                                                          first->file)),
-                                 first->file->compiled);
+                                 first->file->compiled[COMPILE_NORMAL]);
        if (system(command))
                doesnt_matter();
 }