summaryrefslogtreecommitdiffstats
path: root/apps/pkcs12.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-12-18 16:15:49 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-12-21 12:11:49 +0100
commit79b2a2f2eedb9d6b24a3f6748332328cf54568fb (patch)
tree31d61a9636cccc6a378871407b11fc1fc89aa8c6 /apps/pkcs12.c
parent0d4c52320d245be80bd69346fdda4b12b4961eae (diff)
add OSSL_STACK_OF_X509_free() for commonly used pattern
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17307)
Diffstat (limited to 'apps/pkcs12.c')
-rw-r--r--apps/pkcs12.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 65dcdad38a..44b53b0b54 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -610,7 +610,7 @@ int pkcs12_main(int argc, char **argv)
/* Add the remaining certs (except for duplicates) */
add_certs = X509_add_certs(certs, chain2, X509_ADD_FLAG_UP_REF
| X509_ADD_FLAG_NO_DUP);
- sk_X509_pop_free(chain2, X509_free);
+ OSSL_STACK_OF_X509_free(chain2);
if (!add_certs)
goto export_end;
} else {
@@ -697,8 +697,8 @@ int pkcs12_main(int argc, char **argv)
EVP_PKEY_free(key);
EVP_MD_free(macmd);
- sk_X509_pop_free(certs, X509_free);
- sk_X509_pop_free(untrusted_certs, X509_free);
+ OSSL_STACK_OF_X509_free(certs);
+ OSSL_STACK_OF_X509_free(untrusted_certs);
X509_free(ee_cert);
ERR_print_errors(bio_err);