diff options
author | tb <> | 2025-06-01 03:23:33 +0000 |
---|---|---|
committer | tb <> | 2025-06-01 03:23:33 +0000 |
commit | 632a56e17e3ac4630e113b80ed89f403883f464f (patch) | |
tree | d700146cebb08b8dea99dea5bc6929d83f70aea9 /src | |
parent | 25aff2fe17157a12a5ce5cefac17a37b3281855e (diff) | |
download | openbsd-632a56e17e3ac4630e113b80ed89f403883f464f.tar.gz openbsd-632a56e17e3ac4630e113b80ed89f403883f464f.tar.bz2 openbsd-632a56e17e3ac4630e113b80ed89f403883f464f.zip |
Fix resource leaks in ec_points_make_affine()
Add missing BN_CTX_end() and free prod_Z.
CID 552848 (for prod_Z)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_hp_methods.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ecp_hp_methods.c b/src/lib/libcrypto/ec/ecp_hp_methods.c index 72df395498..c62334e7c8 100644 --- a/src/lib/libcrypto/ec/ecp_hp_methods.c +++ b/src/lib/libcrypto/ec/ecp_hp_methods.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_hp_methods.c,v 1.2 2025/05/25 05:43:33 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_hp_methods.c,v 1.3 2025/06/01 03:23:33 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2024-2025 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024-2025 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -778,6 +778,9 @@ ec_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], | |||
778 | ret = 1; | 778 | ret = 1; |
779 | 779 | ||
780 | err: | 780 | err: |
781 | BN_CTX_end(ctx); | ||
782 | free(prod_Z); | ||
783 | |||
781 | return ret; | 784 | return ret; |
782 | } | 785 | } |
783 | #endif | 786 | #endif |