mirror of
https://github.com/openssl/openssl.git
synced 2024-12-25 09:53:52 +08:00
Don't leak memory in v2i_AUTHORITY_KEYID
The v2i_AUTHORITY_KEYID() function can leak memory under an error condition. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
1c422164d8
commit
97323d57cd
@ -143,12 +143,16 @@ static AUTHORITY_KEYID *v2i_AUTHORITY_KEYID(X509V3_EXT_METHOD *method,
|
||||
}
|
||||
|
||||
akeyid->issuer = gens;
|
||||
gen = NULL;
|
||||
gens = NULL;
|
||||
akeyid->serial = serial;
|
||||
akeyid->keyid = ikeyid;
|
||||
|
||||
return akeyid;
|
||||
|
||||
err:
|
||||
sk_GENERAL_NAME_free(gens);
|
||||
GENERAL_NAME_free(gen);
|
||||
X509_NAME_free(isname);
|
||||
ASN1_INTEGER_free(serial);
|
||||
ASN1_OCTET_STRING_free(ikeyid);
|
||||
|
Loading…
Reference in New Issue
Block a user