diff options
| author | tb <> | 2025-06-01 03:23:33 +0000 |
|---|---|---|
| committer | tb <> | 2025-06-01 03:23:33 +0000 |
| commit | 5df8087a42612332d095e39b6e5aa10e6a909eed (patch) | |
| tree | d700146cebb08b8dea99dea5bc6929d83f70aea9 /src | |
| parent | 876fb675104a4f3fd138c0a1ccfbd720c0df976a (diff) | |
| download | openbsd-5df8087a42612332d095e39b6e5aa10e6a909eed.tar.gz openbsd-5df8087a42612332d095e39b6e5aa10e6a909eed.tar.bz2 openbsd-5df8087a42612332d095e39b6e5aa10e6a909eed.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 |
