From b9eceda29965af989ad2150082454ae353266fa5 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 23 Nov 2018 07:47:30 +0100 Subject: build: Simplify assertions Let it leak memory when we assert, so not to confuse static analyzers as if this is the normal case. --- common/test.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'common/test.c') diff --git a/common/test.c b/common/test.c index c88aff1..3827ab0 100644 --- a/common/test.c +++ b/common/test.c @@ -482,17 +482,13 @@ p11_test_file_write (const char *base, f = fopen (name, "wb"); if (f == NULL) { printf ("# couldn't open file for writing: %s: %s\n", name, strerror (errno)); - free (path); assert_not_reached (); - return; } if (fwrite (contents, 1, length, f) != length || fclose (f) != 0) { printf ("# couldn't write to file: %s: %s\n", name, strerror (errno)); - free (path); assert_not_reached (); - return; } free (path); @@ -512,9 +508,7 @@ p11_test_file_delete (const char *base, if (unlink (name) < 0) { printf ("# Couldn't delete file: %s\n", name); - free (path); assert_not_reached (); - return; } free (path); -- cgit v1.1