Fix leak on malloc failure in X509_verify_cert.
(Imported from upstream's 25efcb44ac88ab34f60047e16a96c9462fad39c1 and 56353962e7da7e385c3d577581ccc3015ed6d1dc.) Change-Id: I2ff22fc9da23868de02e6f31c50a3f1d0c6dec1a Reviewed-on: https://boringssl-review.googlesource.com/5710 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
5f4de9aa8f
commit
a6ee3de08e
@ -358,7 +358,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
|
||||
{
|
||||
X509_free(xtmp);
|
||||
OPENSSL_PUT_ERROR(X509, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
ok = 0;
|
||||
goto end;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user