aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-05-16 21:23:07 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-05-16 21:23:07 +0300
commitcea71d6e5230d01156d6945f0c2cb8e26f4095c4 (patch)
treef630de7bff46c45c7f4773429d1e37cb0cd86b65
parent714c5735e4a1ffce8f3124835dc4bb59a8735c0b (diff)
downloadlibmicrohttpd-cea71d6e5230d01156d6945f0c2cb8e26f4095c4.tar.gz
libmicrohttpd-cea71d6e5230d01156d6945f0c2cb8e26f4095c4.zip
test_sha1: minor fixes
-rw-r--r--src/microhttpd/test_sha1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/microhttpd/test_sha1.c b/src/microhttpd/test_sha1.c
index 276c7838..d82a2678 100644
--- a/src/microhttpd/test_sha1.c
+++ b/src/microhttpd/test_sha1.c
@@ -373,7 +373,7 @@ test_unaligned (void)
373 buf = malloc (tdata->bin_l.len + MAX_OFFSET); 373 buf = malloc (tdata->bin_l.len + MAX_OFFSET);
374 digest_buf = malloc (SHA1_DIGEST_SIZE + MAX_OFFSET); 374 digest_buf = malloc (SHA1_DIGEST_SIZE + MAX_OFFSET);
375 if ((NULL == buf) || (NULL == digest_buf)) 375 if ((NULL == buf) || (NULL == digest_buf))
376 _exit (99); 376 exit (99);
377 377
378 for (offset = MAX_OFFSET; offset >= 1; --offset) 378 for (offset = MAX_OFFSET; offset >= 1; --offset)
379 { 379 {
@@ -392,6 +392,7 @@ test_unaligned (void)
392 num_failed += check_result (__FUNCTION__, MAX_OFFSET - offset, 392 num_failed += check_result (__FUNCTION__, MAX_OFFSET - offset,
393 unaligned_digest, tdata->digest); 393 unaligned_digest, tdata->digest);
394 } 394 }
395 free (digest_buf);
395 free (buf); 396 free (buf);
396 return num_failed; 397 return num_failed;
397} 398}