From 32aaf753429b178eb1a6e79576c005ac915b4447 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 15 Feb 2011 23:29:28 +1030 Subject: [PATCH] failtest: call failtest_exit_check even in non-failing parent. --- ccan/failtest/failtest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index dcf034cc..ccc89b22 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -980,16 +980,16 @@ void failtest_exit(int status) { int i; - if (control_fd == -1) { - free_everything(); - exit(status); - } - if (failtest_exit_check) { if (!failtest_exit_check(history, history_num)) child_fail(NULL, 0, "failtest_exit_check failed\n"); } + if (control_fd == -1) { + free_everything(); + exit(status); + } + /* Cleanup everything, in reverse order. */ for (i = history_num - 1; i >= 0; i--) if (history[i].cleanup) -- 2.39.2