summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2025-08-12 22:51:00 +0200
committerDimitri Staessens <dimitri@ouroboros.rocks>2025-08-15 11:47:59 +0200
commit0f26a0d42b4fc9fb06ab3138b36db2bcc69d2cbd (patch)
tree1c21dee481784cb3296f99bb8f4f0c2c90938c4e /src/lib
parent23603e2d74298d0fd4df9858003ad3b7798f0254 (diff)
downloadouroboros-0f26a0d42b4fc9fb06ab3138b36db2bcc69d2cbd.tar.gz
ouroboros-0f26a0d42b4fc9fb06ab3138b36db2bcc69d2cbd.zip
lib: Fix memory leaks in tests
Fixes memory leaks in the tests that had escaped detection. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/tests/auth_test.c1
-rw-r--r--src/lib/tests/crypt_test.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/tests/auth_test.c b/src/lib/tests/auth_test.c
index f0a8899a..a5bf931d 100644
--- a/src/lib/tests/auth_test.c
+++ b/src/lib/tests/auth_test.c
@@ -511,6 +511,7 @@ int test_auth_bad_signature(void)
goto fail_verify;
}
+ freebuf(fake_sig);
freebuf(sig);
crypt_free_key(pk);
diff --git a/src/lib/tests/crypt_test.c b/src/lib/tests/crypt_test.c
index 7f011e5c..7489d5b3 100644
--- a/src/lib/tests/crypt_test.c
+++ b/src/lib/tests/crypt_test.c
@@ -216,6 +216,8 @@ int test_crypt_encrypt_decrypt(void)
}
crypt_destroy_ctx(ctx);
+ freebuf(out2);
+ freebuf(out);
TEST_SUCCESS();