diff options
author | Paul Yang <yang.yang@baishancloud.com> | 2017-10-27 01:56:14 +0800 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-10-26 14:34:35 -0400 |
commit | 7a908204ed3afe1379151c6d090148edb2fcc87e (patch) | |
tree | c59897274c934708a1c630cba56748d784e3c4b7 /crypto/x509v3/v3_crld.c | |
parent | 689c17883ac20d0991427b822eb98d2f0e6b78e7 (diff) | |
download | openssl-7a908204ed3afe1379151c6d090148edb2fcc87e.tar.gz |
Simplify the stack reservation
Use the newly introduced sk_TYPE_new_reserve API to simplify the
reservation of stack as creating it.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4592)
Diffstat (limited to 'crypto/x509v3/v3_crld.c')
-rw-r--r-- | crypto/x509v3/v3_crld.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/x509v3/v3_crld.c b/crypto/x509v3/v3_crld.c index 085a90d2db..6cba4240ab 100644 --- a/crypto/x509v3/v3_crld.c +++ b/crypto/x509v3/v3_crld.c @@ -244,8 +244,8 @@ static void *v2i_crld(const X509V3_EXT_METHOD *method, const int num = sk_CONF_VALUE_num(nval); int i; - crld = sk_DIST_POINT_new_null(); - if (crld == NULL || !sk_DIST_POINT_reserve(crld, num)) + crld = sk_DIST_POINT_new_reserve(NULL, num); + if (crld == NULL) goto merr; for (i = 0; i < num; i++) { DIST_POINT *point; |