mirror of
https://github.com/openssl/openssl.git
synced 2024-12-26 10:24:04 +08:00
GH364: Free memory on an error path
Part of RT 3997 Per Ben, just jump to common exit code. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
df758a8569
commit
cc2829e664
@ -348,7 +348,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
|
|||||||
if (!sk_X509_push(ctx->chain, x)) {
|
if (!sk_X509_push(ctx->chain, x)) {
|
||||||
X509_free(xtmp);
|
X509_free(xtmp);
|
||||||
X509err(X509_F_X509_VERIFY_CERT, ERR_R_MALLOC_FAILURE);
|
X509err(X509_F_X509_VERIFY_CERT, ERR_R_MALLOC_FAILURE);
|
||||||
return 0;
|
ok = 0;
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user