projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7aacc3
)
Fix locking in ssl_cert_dup()
author
Todd Short
<tshort@akamai.com>
Wed, 9 Mar 2016 15:01:43 +0000
(10:01 -0500)
committer
Rich Salz
<rsalz@openssl.org>
Wed, 9 Mar 2016 16:26:01 +0000
(11:26 -0500)
Properly check the return value of CRYPTO_THREAD_lock_new()
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
ssl/ssl_cert.c
patch
|
blob
|
history
diff --git
a/ssl/ssl_cert.c
b/ssl/ssl_cert.c
index 21cfb965d20ceb66586a3b78a317d238ba2eac89..8915531d42a831dc9afcaa7389f1afda051100b1 100644
(file)
--- a/
ssl/ssl_cert.c
+++ b/
ssl/ssl_cert.c
@@
-190,7
+190,7
@@
CERT *ssl_cert_dup(CERT *cert)
ret->references = 1;
ret->key = &ret->pkeys[cert->key - cert->pkeys];
ret->lock = CRYPTO_THREAD_lock_new();
- if (ret == NULL) {
+ if (ret
->lock
== NULL) {
SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_MALLOC_FAILURE);
OPENSSL_free(ret);
return NULL;