Browse Source

ccanlint: fix uninitialized variables in tests_pass_valgrind.

We weren't initializing the leak_info field when the test was marked
FAIL in _info (as in tdb2).
Rusty Russell 14 years ago
parent
commit
13911ef769
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tools/ccanlint/tests/tests_pass_valgrind.c

+ 3 - 1
tools/ccanlint/tests/tests_pass_valgrind.c

@@ -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);