From: Rusty Russell Date: Tue, 1 Nov 2011 23:04:29 +0000 (+1030) Subject: ccanlint: fix uninitialized variables in tests_pass_valgrind. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=13911ef769824a0958e1f1ce7292dfc8f23feb18;ds=sidebyside 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). --- diff --git a/tools/ccanlint/tests/tests_pass_valgrind.c b/tools/ccanlint/tests/tests_pass_valgrind.c index 81814377..bf914856 100644 --- a/tools/ccanlint/tests/tests_pass_valgrind.c +++ b/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);