X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fx509v3%2Fv3_cpols.c;h=51fbb1f03ab3577934cee55b586eebb32f74184e;hp=56460a381abc91accbb3e9fc7a2e7e4dcb08e2f5;hb=7a908204ed3afe1379151c6d090148edb2fcc87e;hpb=689c17883ac20d0991427b822eb98d2f0e6b78e7 diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c index 56460a381a..51fbb1f03a 100644 --- a/crypto/x509v3/v3_cpols.c +++ b/crypto/x509v3/v3_cpols.c @@ -102,8 +102,8 @@ static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, return NULL; } - pols = sk_POLICYINFO_new_null(); - if (pols == NULL || !sk_POLICYINFO_reserve(pols, num)) { + pols = sk_POLICYINFO_new_reserve(NULL, num); + if (pols == NULL) { X509V3err(X509V3_F_R2I_CERTPOL, ERR_R_MALLOC_FAILURE); goto err; }