diff options
author | Daiki Ueno <dueno@redhat.com> | 2018-11-23 07:47:30 +0100 |
---|---|---|
committer | Daiki Ueno <dueno@redhat.com> | 2018-11-23 07:49:35 +0100 |
commit | b9eceda29965af989ad2150082454ae353266fa5 (patch) | |
tree | cb4bba18f60b04eddb8076c39ee3d75eb5264bb4 /common | |
parent | b92e8c7f5c082a55073903d53293e6aeecb9d0ed (diff) |
build: Simplify assertions
Let it leak memory when we assert, so not to confuse static analyzers
as if this is the normal case.
Diffstat (limited to 'common')
-rw-r--r-- | common/test.c | 6 |
1 files changed, 0 insertions, 6 deletions
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); |