Missing free item on push failure
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1905)
This commit is contained in:
parent
71a8b85574
commit
2d13250fd6
1 changed files with 1 additions and 0 deletions
|
@ -469,6 +469,7 @@ static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, const ASN1_IA5STRING *email
|
|||
return 1;
|
||||
emtmp = OPENSSL_strdup((char *)email->data);
|
||||
if (emtmp == NULL || !sk_OPENSSL_STRING_push(*sk, emtmp)) {
|
||||
OPENSSL_free(emtmp); /* free on push failure */
|
||||
X509_email_free(*sk);
|
||||
*sk = NULL;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue