Browse Source

failtest: stop when leak detected.

Don't continue when we report a leak: tell the parent it's a failure.
Rusty Russell 14 years ago
parent
commit
acb6106ca2
1 changed files with 4 additions and 1 deletions
  1. 4 1
      ccan/failtest/failtest.c

+ 4 - 1
ccan/failtest/failtest.c

@@ -488,7 +488,10 @@ static NORETURN void failtest_cleanup(bool forced_cleanup, int status)
 	}
 
 	free_everything();
-	tell_parent(SUCCESS);
+	if (status == 0)
+		tell_parent(SUCCESS);
+	else
+		tell_parent(FAILURE);
 	exit(status);
 }