Properly clean up on ssl_cert_dup failure.
Caught by scan-build. Change-Id: I7c09b176d6a9e5d4fcd6e4fba184ac0679983cff Reviewed-on: https://boringssl-review.googlesource.com/2200 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
25cb99c149
commit
3f383908e2
@ -361,13 +361,7 @@ CERT *ssl_cert_dup(CERT *cert)
|
|||||||
return(ret);
|
return(ret);
|
||||||
|
|
||||||
err:
|
err:
|
||||||
if (ret->dh_tmp != NULL)
|
ssl_cert_free(ret);
|
||||||
DH_free(ret->dh_tmp);
|
|
||||||
if (ret->ecdh_tmp != NULL)
|
|
||||||
EC_KEY_free(ret->ecdh_tmp);
|
|
||||||
|
|
||||||
ssl_cert_clear_certs(ret);
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user