diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_mutl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c index f3a6ea3ba3..aaba1e74de 100644 --- a/src/lib/libcrypto/pkcs12/p12_mutl.c +++ b/src/lib/libcrypto/pkcs12/p12_mutl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_mutl.c,v 1.27 2021/12/12 21:30:14 tb Exp $ */ | 1 | /* $OpenBSD: p12_mutl.c,v 1.28 2022/07/24 18:41:08 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -174,7 +174,8 @@ int | |||
174 | PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, | 174 | PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, |
175 | const EVP_MD *md_type) | 175 | const EVP_MD *md_type) |
176 | { | 176 | { |
177 | if (!(p12->mac = PKCS12_MAC_DATA_new())) | 177 | PKCS12_MAC_DATA_free(p12->mac); |
178 | if ((p12->mac = PKCS12_MAC_DATA_new()) == NULL) | ||
178 | return PKCS12_ERROR; | 179 | return PKCS12_ERROR; |
179 | if (iter > 1) { | 180 | if (iter > 1) { |
180 | if (!(p12->mac->iter = ASN1_INTEGER_new())) { | 181 | if (!(p12->mac->iter = ASN1_INTEGER_new())) { |